OpenStreetMap Geolocate

By Samat Jain Last update Jul 3, 2010 — Installed 644 times.


Script Summary: Adds a "Geolocate me" button that centers the map to your current location as reported via HTML5 geolocation

Version: 2.0

Copyright: 2010+, Samat Jain (http://samat.org)

License: GPL version 2 or any later version; http://www.gnu.org/copyleft/gpl.html

Script homepage

Thumb

Adds a "Geolocate me" link next to the OpenStreetMap.org search box. If your browser supports it and you've granted permission, clicking on this link will center your map window to your location, as reported by your browser via the HTML 5 geolocation API.

On most browsers, the HTML 5 geolocation API uses Google Location Services or Skyhook, which determine your location based on nearby wireless 802.11 access points. However, some browsers, like Firefox 3.6 on Linux, can talk to gpsd and your GPS unit, so geolocation can get quite accurate.

Tested on Firefox 3.6, Chrome 5, and Opera 10.60. I've been told it also works on Safari 5.