Evangelism/Firefox3.5/35Days/Articles/geolocationDemo: Difference between revisions
Line 8: | Line 8: | ||
[http://3liz.org/geolocation/ Geolocation API Demo with OpenLayers, OpenStreetMap and GeoNames] | [http://3liz.org/geolocation/ Geolocation API Demo with OpenLayers, OpenStreetMap and GeoNames] | ||
The demo draws a map centered on the position given by the navigator. | The demo draws a map centered on the position given by the navigator. But if you want to see where the navigator geolocalize you: ''Don't forget to click "Share location"''. The position is drawn with a red Marker. | ||
''Don't forget to click "Share location" | |||
With the position, the navigator gives an accuracy. The demo uses it to determine an extent to zoom to, and draws a cyan point representing it. | |||
But wich is interesting with the position and its accuracy, is to provide geo-localized information to the user, and we can find free geo-localized information on internet. | |||
The first one is the base layer of the map in the demos : OpenStreetMap. It's a project to create and provide free geographic data such as street maps to anyone who wants them. In the demo you can see if free geographic data are available around you. | |||
The next one is wikipedia's articles. In some articles, like [http://en.wikipedia.org/wiki/Mountain_View,_California Mountain View] or [http://en.wikipedia.org/wiki/Montpellier Montpellier], you can find coordinates, and GeoNames provides a web service to query wikipdeia's articles with geo-localised parameters like an extent. In the demo, you can discover wikipedia's article around you. | |||
The last one is directly GeoNames information. GeoNames is a geographical database covers all countries and contains over eight million placenames that are available for download free of charge and provides web services to query this database. In the demo you can discover some information provides by GeoNames like cities, village, lake, parks, hotels wich you can find around you. | |||
The layer mechanism is powered by OpenLayers. A free Javascript library. | The layer mechanism is powered by OpenLayers. A free Javascript library. |
Revision as of 13:14, 9 June 2009
Geolocation API and free data providers
Doug Turner, the man behind the Geolocation implementation in Firefox 3.5, has written a great article about this new mechanism (FIXME: link to the hacks.m.o Doug's article).
Here is a demo showing how you can enjoy this feature, only with free tools and free data.
Geolocation API Demo with OpenLayers, OpenStreetMap and GeoNames
The demo draws a map centered on the position given by the navigator. But if you want to see where the navigator geolocalize you: Don't forget to click "Share location". The position is drawn with a red Marker.
With the position, the navigator gives an accuracy. The demo uses it to determine an extent to zoom to, and draws a cyan point representing it.
But wich is interesting with the position and its accuracy, is to provide geo-localized information to the user, and we can find free geo-localized information on internet.
The first one is the base layer of the map in the demos : OpenStreetMap. It's a project to create and provide free geographic data such as street maps to anyone who wants them. In the demo you can see if free geographic data are available around you.
The next one is wikipedia's articles. In some articles, like Mountain View or Montpellier, you can find coordinates, and GeoNames provides a web service to query wikipdeia's articles with geo-localised parameters like an extent. In the demo, you can discover wikipedia's article around you.
The last one is directly GeoNames information. GeoNames is a geographical database covers all countries and contains over eight million placenames that are available for download free of charge and provides web services to query this database. In the demo you can discover some information provides by GeoNames like cities, village, lake, parks, hotels wich you can find around you.
The layer mechanism is powered by OpenLayers. A free Javascript library.
That's a kind of data mashup from free tools and free data.
If you want to know more:
- link to MDC & Geolocation
- link to GeoNames
- link to OpenStreetMap
- link to OpenLayers
some comments
- too preachy - should be more pragmatic
- need some information about Geoname & OpenStreetmap
- if the accurate is high, add geodata to a bigger neighborhood, but still zoom as deep as possible