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.

The developer dashboard has moved

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close