Evangelism/Firefox3.5/35Days/Articles/geolocationDemo

From MozillaWiki
Jump to: navigation, search

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.

Geolocation API Demo with OpenLayers, OpenStreetMap and GeoNames

The demo draws a map centered on the position given by the navigator. But, first, don't forget to click "Share location" to let Firefox sharing your position.

Your position is drawn with a red Marker.

With the position, the navigator provides an accuracy. The demo uses it to determine an area to zoom to, and draws a cyan circle representing it.

Some geo-localized information are displayed in your neighborhood. There are provided by some free web-services.

These informations are displayed as a set of layers.

  • The first one, the base layer is the map itself, provided by OpenStreetMap. It's a project to create and provide free geographic data, such as street maps, to anyone who wants them.
  • The next one is wikipedia's articles. In some articles, like Mountain View or Montpellier, you can find coordinates. GeoNames provides a web-service to query wikipedia's articles from the geo-localised parameters. In the demo, you can discover wikipedia's article around you.
  • The last one is directly GeoNames' information. GeoNames is a geographical database covering all countries and containing over eight million placenames. In the demo you can discover (around you) some information provides by GeoNames like cities, village, lake, parks, hotels which you can find around you.

All the map and layer mechanism is powered by OpenLayers, a free Javascript library constructs to put a dynamic map in any web page.

That's a kind of data mashup from free tools and free data, realised by René-Luc from 3Liz.

3Liz is a fresh dynamic startup specialized in Open Source GIS and Webmapping application development and founded by René-Luc with some Mozilla friends.We provide innovating and friendly-user mapping applications.

If you want to know more:

screen1.png

screen3.png

screen2.png

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