O'Reilly logo

PhoneGap Essentials: Building Cross-Platform Mobile Apps by John M. Wargo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

19. Geolocation

The Geolocation API allows an application to leverage the GPS capabilities of a mobile device and determine the device’s location on the surface of the earth. Using this API, either an application can manually check the device’s current position or it can create a location watch that will cause the application to be periodically notified of the device’s physical location.

To use this API, the device running the application must provide geolocation capabilities (by utilizing either a GPS radio and associated software or some alternate mechanism for determining the device’s location). While geolocation capabilities in smartphones are regularly enhanced in newer models, an application cannot guarantee that even though the device ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required