GEOG5870/1M: Web-based GIS A course on web-based mapping

A recap of earlier work

In the first lecture on GoogleMaps, we started by looking at the history and general features of Google Maps. The service was introduced in 2005, and has grown rapidly in popularity since then. The basic map data, and the framework for placing markers on the maps, use a Mercator projection, based on the WGS84 datum, the same datum used by many applications with a worldwide scope, including the Global Positioning System. GoogleMaps supports a number of map views, including Map (the default view) View, Street View, and Satellite View, and a number of layers, including Terrain and Traffic. The Traffic layer shows in the default Map view, giving major roads have shading and line-style varied according to real-time traffic flow data.

Generating bespoke maps

There are a number of ways of generating bespoke maps using Google Maps, including using My Maps to add KML data, and either making it publicly accessible, or doing that and further embedding it in a webpage.

A far more powerful and flexible way of creating bespoke maps is to use the GoogleMaps API. Google Maps is based around a Javascript interface that draws map data from a server, and presents it on screen with various control functions. By using the API, you can extend the Javascript map interface in many ways, adding your own data as overlays and modifying the appearance of the map.

Earlier, we looked at ways of extending the basic map in order to be able to present more useful information. This was demonstrated by adding some simple markers to the map, with pop-up information windows. At the same time, the growing size of the html page associated with this led to a need to clean up the code, and to separate out elements on a functional basis: individual files were created and used to contain the basic html code, the map loading logic, and a data file.

The practical session focused on a more substantive task: creating a map with a set of markers, and with pop-up information linked to each marker. The markers related to the locations of Blue Plaques in and around central Leeds. The task presented two major problems that are characteristic of similar real-world tasks: first, extracting the data from a spreadsheet in a usable format, and second, converting the co-ordinate data into the required format.

The resulting page should have looked something like that shown above, although it is possible to have included much richer background information, and to have presented the map in a more appealing manner.



[ Next: Creating and adding lines and polygons ]
[
Course Index]