Wherever You Go, There We Are: the Geolocation API

Nov 23, 2015

No matter how you go mobile, you can meet your user’s needs. Recommendations based on location are plentiful, particularly on native apps. But don’t fret, agencies with mobile websites: you can also get in the location customization game.

Mobile phone gps navigation, travel destination, location and positioning concept of a map and single marker over a smart phone

Geolocation is a W3C scripting API that can be used with JavaScript in Web browsers. In the past, geolocation could only be done in native apps through a mobile programming API. With the Geolocation API, a mobile web app can request a user’s location.

Screen capture of the Find Your Park service on an iPhone asking for permission to use the phone's Current Location.
There are numerous ways federal agencies could use this API. For example, the National Park Service (NPS)’s FindYourPark.com provides customized recommendations based on a user’s location. As noted in a previous DigitalGov article, NPS metadata from NPS.gov is pulled over to the FindYourPark website, including information about Centennial Rvents and the maps for the find feature.

Geolocation is not part of W3C HTML5 or the WHATWG HTML. However, W3C has published specifications to standardize this API to retrieve the geographical location information for a client-side device.

Additional Resources:

Originally posted by Ashley Wichman on Nov 23, 2015
Originally posted by Leo Yang on Nov 23, 2015
Nov 23, 2015