Evangelism/Firefox3.5/35Days/Articles/geolocationDemo: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
Line 1: Line 1:
== Geolocation API and free data providers ==
== Geolocation API and free data providers ==


[http://3liz.org/geolocation/ Demo]
[http://3liz.org/geolocation/ Geolocation API Demo with OpenLayers, OpenStreetMap and GeoNames]


The demo draws a map center on the position given by the navigator, it determines the map's precision by defining an accuracy extent, and load geo-information inside the accuracy.
The demo draws a map center on the position given by the navigator, it determines the map's precision by defining an accuracy extent, and load geo-information inside the accuracy.


The map is drawn with OpenLayers, a JavaScript library to draw dynamic map inside web page. The base layer is provided by OpenStreetMap (OSM). OSM is a project to construct a free world map based on contribution. The geo-information inside the accuracy is provided by GeoNames, a free database of geolocalised places. GeoNames provides a way to query geolocalised wikipedia's articles.
The map is drawn with [http://openlayers.org OpenLayers], a JavaScript library to draw dynamic map inside web page. The base layer is provided by [http://openstreetmap.org OpenStreetMap] (OSM). OSM is a project to construct a free world map based on contribution. The geo-information inside the accuracy is provided by [http://geonames.org GeoNames], a free database of geolocalised places. GeoNames provides a way to query geolocalised wikipedia's articles.


The main operation is to calculate an extent based on the position and its accuracy.
The main operation is to calculate an extent based on the position and its accuracy.


Une fois que nous connaissons cet extent, the map is zoom to extent (center to the position with a precision reflecting the accuracy) and we query GeoNames to know geolocalised wikipedia's article and places inside the accuracy extent. If the accuracy is less than 1000 meters, we used to query GeoNames an accuracy extent based on an accuracy of 1000 meters.


=== Defining Accuracy Extent ===


To zoom to the area cover by the position with the accuracy, we need to calculate an accuracy extent.
Une fois que nous connaissons cet extent, the map is zoom to extent (center to the position with a precision reflecting the accuracy) and we query GeoNames to know geolocalised wikipedia's article and places inside the accuracy extent. If the accuracy is less than 1000 meters, we used to query GeoNames an accuracy extent based on an accuracy of 1000 meters.

Revision as of 14:24, 8 June 2009

Geolocation API and free data providers

Geolocation API Demo with OpenLayers, OpenStreetMap and GeoNames

The demo draws a map center on the position given by the navigator, it determines the map's precision by defining an accuracy extent, and load geo-information inside the accuracy.

The map is drawn with OpenLayers, a JavaScript library to draw dynamic map inside web page. The base layer is provided by OpenStreetMap (OSM). OSM is a project to construct a free world map based on contribution. The geo-information inside the accuracy is provided by GeoNames, a free database of geolocalised places. GeoNames provides a way to query geolocalised wikipedia's articles.

The main operation is to calculate an extent based on the position and its accuracy.


Une fois que nous connaissons cet extent, the map is zoom to extent (center to the position with a precision reflecting the accuracy) and we query GeoNames to know geolocalised wikipedia's article and places inside the accuracy extent. If the accuracy is less than 1000 meters, we used to query GeoNames an accuracy extent based on an accuracy of 1000 meters.