Integrating the Geolocation API

The Geolocation API can be integrated with your ArcGIS Server applications to get the location of a mobile device. It can also be used to get the location from a web-based application, but this isn't nearly as accurate as it uses the IP address rather than a GPS or cell tower triangulation.

This API has built-in security that requires explicit permission from the end user before this functionality can be used in an application. Mobile and web applications will both display a prompt that requests permission to obtain the current location of a device. This prompt will appear similar to what is shown in the following screenshot:

Most browsers support the Geolocation API specification, which provides scripted access to ...

Get Building Web and Mobile ArcGIS Server Applications with JavaScript now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.