Skip to content

Comment on Geo.js, Building location-aware mobile websites with Javascript

Comments

This snippet uses the new navigator.geolocation.getCurrentPosition() feature in Firefox 3.5

You will be redirected to Google Maps if you click the folowing link:

(You must click "share location" when prompted by the browser, you know, privacy concerns)

  javascript:navigator.geolocation.getCurrentPosition(function(position){window.location.href="http://maps.google.com/?ll="+position.coords.latitude+","+position.coords.longitude;});
Drop it in your bookmarks toolbar and presto!

Or get it from here http://mylittlehacks.appspot.com/geolocation

http://pastie.org/541651 (added quotes, and doesn't get link cutoff)

edit: looks like you fixed it :D

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.