Aller au contenu | Aller au menu | Aller à la recherche

geolocation with open street maps

For the mozilla 35 days project, I created a demo which used Geolocation with open source software and open data from various projects. Article on

Three days ago we had a post from Doug Turner describing how Geolocation works in Firefox 3.5. I have taken the geolocation functionality in Firefox 3.5 and blended it together with data from OpenStreetMap and a few other sources of free data. You can try the demo below. Don’t forget to click the Share Location button in the drop down when it appears on the site.

Launch the Demo in Firefox 3.5

Assuming that it was able to find your location, you should see where you are with a red marker. A blue circle surrounds the red marker indicating the accuracy of your location information. Note that since this information is based on a combination of your IP address and possibly local WiFi access points, its accuracy can vary.

This demo also tries to pull in information from other sources about your local area. Each set of information is shown as a layer. These layers are:

  • The base layer is the map itself, provided by OpenStreetMap. OpenStreetMap is a project to create and provide free geographic data, such as street maps, to anyone who wants them. Much like Wikipedia, it’s possible for anyone to edit the maps and add their own information.
  • The next layer is based on articles in Wikipedia. In some articles, like Mountain View or Montpellier, you can find coordinates. GeoNames provides a web service to query Wikipedia’s articles by location. With this demo you can discover Wikipedia articles about things and places around you.
  • The last layer is based on GeoNames. GeoNames is a geographical database covering all countries and contains over eight million placenames. In this demo you can see things from the GeoNames database like cities, villages, lakes, parks, or even hotels.

The map and layers are built using OpenLayers, a free JavaScript library that you can use to put a dynamic map on any web page.


We’ve also included a couple more screenshots of places that have data already loaded.


1. Le dimanche 14 juin 2009, 11:29 par Plin

Hmm. I ended up on the wrong contintent? I am in Germany but was located in Mountain View, CA :P

2. Le dimanche 14 juin 2009, 23:11 par René-luc D'Hont

Probably a problem with the provider...