Geolocation for webdevelopers with Mozilla’s Geode add on

Total
0
Shares

The folks at Mozilla Labs released an experimental Add-on for Firefox called Geode. This extension will allow website developers to request a user’s location from the browser. The browser will ask the user for permission and return the location of the user if allowed. The location can be determined automatically if you have a GPS device connected, entered manually or by using a specific service for geolocation.

The Geode experiment is probably just for testing as its functionality will be built into Firefox 3.1, which will support the W3C Geolocation Specification.

After this Geolocation feature will get bundled in more and more browsers web developers will be able to get the user’s location just by issuing something similar to this:

navigator.geolocation.getCurrentPosition(function(pos) {
  alert( pos.latitude + ", " + pos.longitude );
})

Knowing the user’s location would enhance the information and services a website can provide for the user. A news website could offer truly local news. If you have a travel site you could determine the user’s location and suggest relevant local tourist facilities or attractions.

Note:
Of course geolocation by ip address exists today but it is not as accurate as this would be.

Leave a Reply

Your email address will not be published. Required fields are marked *

You May Also Like