[OSM-talk] map with FF 3.5 geolocation und hostip
Gervase Markham
gerv-gmane at gerv.net
Tue Jul 7 10:08:48 BST 2009
On 02/07/09 20:53, Ævar Arnfjörð Bjarmason wrote:
> People care because it has been standardized and is being implemented
> by major players: http://dev.w3.org/geo/api/spec-source.html
Here's a bookmarklet which will geolocate you using the API, and
redirect you to a map of your location with a marker:
javascript:navigator.geolocation.getCurrentPosition(function(a){c=a.coords;window.location="http://www.osm.org/?zoom=15&mlat="+c.latitude+"&mlon="+c.longitude;},function(){alert("Rejected!")});
(Thanks to Johnathan Nightingale for the inspiration and code:
http://blog.johnath.com/2009/06/24/google-maps-geolocation-bookmarklet/ )
But we should really be doing object detection and adding a "Find Me"
button for appropriate browsers to the main OSM web page.
Gerv
More information about the talk
mailing list