We Know Where Your Browser Lives

date:

2010-05-28 14:03

author:

admin

category:

javascript, opinion, web development

tags:

browser, cloud, firefox, geolocation

slug:

we-know-where-your-browser-lives

status:

published

image Maybe I’m a little late in finding this, but if you have FireFox 3.5 or higher try clicking this link (you will have to agree to let your browser divulge your location to open the link). The JavaScript code run when clicking the link is as follows, and can also be pasted directly into your address bar:

javascript:navigator.geolocation.getCurrentPosition(
function(position){
window.location.href="http://maps.google.com/?ll="+position.coords.latitude+",
"+position.coords.longitude;});

I believe the navigator.geolocation object is also available in Safari, iPhone, and Chrome. The Mozilla documentation provides more details on its use. This StackOverflow question asks which browsers and devices it applies to, and this is set to grow if it becomes part of the browser standards - the W3C has an online draft Geolocation API Specification. They list the following use cases:

  • Find points of interest in the user’s area

  • Annotating content with location information

  • Show the user’s position on a map

  • Turn-by-turn route navigation

  • Alerts when points of interest are in the user’s vicinity

  • Up-to-date local information

  • Location-tagged status updates in social networking applications

There is also a framework API aligned to the W3C specification at http://code.google.com/p/geo-location-javascript/

In the week that ArcGIS is released as a “cloud service”, I believe the real power of the Internet will come more from manipulating and combining data services than putting desktop applications in a browser. Especially if these applications can’t easily integrate open web services. When the full range of ArcGIS geoprocessing tools can be fed streams of GeoJSON, combined with user location, then the geocloud will have truely arrived.

orphan:


Comments

Add Comment