Track current location

This sample demonstrates how to track your movement with the Track widget. It uses the browser's Geolocation API to track a device's location and display it in the MapView. The view rotates according to the heading information provided by the Geolocation API. In 2D, a heading graphic will display when the speed is greater than zero and if the browser provides heading information.

The Track widget is only supported on secure origins. To use it, confirm your application is using a secure origin, such as HTTPS, or localhost is considered "potentially secure" and can be used for easy testing in browsers that supports Window.isSecureContext.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.