Google Maps API

An essential element of the SNOUT website is the display of pollution information collected by the environmental sensors during the SNOUT walk. This information is encoded as XML with categories for sensor type (carbon monoxide, carbon dioxide, noise or organic solvent vapour), location (lat/long coordinates) and sensor value (scaled to 1 - 10). SNOUT uses the Google Maps API GDownloadUrl method to access the XML file and JavaScript to extract the sensor information and display each sensor reading as a separate Google Maps icon located on the map. Information on the boundaries for Haggerston ward where the SNOUT event was to take place were found on the website A semi-opaque polygon covering these boundaries was drawn onto the map using Google Maps GPolygon method. Further information relating to environmental issues was found on the National Statistics website. An extension to the GPolygon method by Mike Williams at provided a way to detect the location of a mouse click in relation to a polygon (whether the click was inside or outside the polygon). This meant the information from National Statistics could be accessed by clicking inside the Haggerston Ward polygonal area.

Figure 5.5 shows the Haggerston Ward polygonal area.

Figure 5.5: Google map.
Jenson Taylor 2008-01-25