HTML5 Guidelines for Web Developers

(coco) #1

194 Chapter 7—Geolocation


Firefox has a very useful extension in the add-on Geolocater, which is
particularly helpful for developing applications. It allows for entering
locations that Firefox returns when the Geolocation API is called. You
can select the location via a pull-down menu without having to resort
to Google’s online service. You can download this useful add-on at
https://addons.mozilla.org/en-US/firefox/addon/14046.

7.4 Display of Current Position on OpenStreetMap


In the following example, the current location is represented on a map of Open-
StreetMap and indicated with a marker. You can see different layers and the
OpenStreetMap navigation bar. Figure 7.3 shows the OpenStreetMap’s Mapnik
layer with the position marker in the center of the browser.

TIP

Figure 7.3 Current location using OpenLayers and OpenStreetMap

© OpenStreetmap contributors, CC-BY-SA
Free download pdf