How the map was constructed

Dataset construction

The basic geographic/attribute data used for the places of worship mapped in this website were obtained from: Moore, Andrew. 2008. Where Leicester has worshipped. Laurel House Publishing, Leicester.

The attribute data were entered into a spreadsheet and the maps provided by Moore scanned and rectified (to match OS OpenData layers, 1880s OS map layers, and some data provided by ULAS) in ArcGIS. The points on his maps were then digitised as a vector point layer and linked to the attribute data within the spreadsheet. This layer was projected into the WGS1984 projection, so that it would import easily into Google Earth, and saved as a shapefile. This shapefile was then converted to a KML file using the MyGeodata Converter.

This KML file was then loaded into Google Earth. The points for existing buildings were then adjusted to match the buildings as shown in Google's satellite and Street View imagery. Obviously, this was not possible for destroyed sites. However, the points that could be matched to satellite images were all reasonably precisely located, so it is fair to assume that the destroyed points should all also be fairly precisely located (say, to the nearest 100 metres or so), assuming they were accurately mapped by Moore. Once the points' positioning had been adjusted, the KML file was then saved.

Somewhat suprisingly (being largely a Google format), KML files are not fully compatible with Google Maps: it is possible to map KML files using Google Maps, but not to query them or change their display options. Therefore, the geographic dataset went through a final conversion to the geographic JSON format (which is Javascript based), again using the MyGeodata Converter. The dataset was then ready for use in the website.

Website contruction

This website was built using Javascript (and, obviously, HTML) code. Google Maps is designed so that Javascript can be used to construct websites that use Google Maps data. It is a fairly simple programming language to work in and many of the examples provided by Google can be easily adapted to fulfil many of the needs which users might have.

The dataset was entered into the webpage as a JSON object (see above): the author generally prefers simple solutions to problems and he thought that this ought to be the simplest way to get the data onto the map. The code for the webpage can then be edited to change the existing sites or add new sites.

The Javascript code for the map reads this JSON object and draws the points onto the map, using bespoke marker icons coloured to show the different states (i.e. in use, out of use, destroyed) of the sites. These markers are .png files with transparent backgrounds. Anyone adapting this website to their own ends could change these markers to their own purposes by simply editing or replacing the image files.

When drawing the points, the code checks against an array object which records which types of place of worship should be displayed. To begin with this is all of them, but the user can make different selections using the checkboxes below the map. If there had been less types of religious group, it should have been possible to construct a user interface that appeared over part of the map, but there were too many types to make this feasible in this instance. If we had restricted ourselves to broader types (e.g. perhaps Anglican, Catholic, Hindu, Islam, Jewish, Other Christian, Sikh), this more elegant solution might have been possible. If adapting the code to mobile device usage, this restriction of types would be recommended.

Various parameters were set to force the map to stay within the Leicester area. The level of zoom has also been restricted so that it cannot zoom out beyond the level at which Leicester appears as a whole city. If adapting this website, these parameters would need adjusting where indicated within the webpage code.

The search function is based upon the geocoding system built into Google Maps, again restricted so that only results within the Leicester area are produced. This means that it is not possible to use it to search for specific places of worship, except where these have been recorded as part of Google's mapping project. The search is, thus, based upon searching for locations rather than items in the dataset. If adapting the website, the restrictions on the search results would also need adjusting where indicated within the webpage code.

The code implemented in this website can be fairly intensive for the user's browser to run. It seems to run more slowly in Internet Explorer when compared to other browsers, especially in older versions of IE. It is, therefore, recommended that users of the website use a fast, modern browser (which is a growing trend in any event). It might prove possible for people adapting the code for other purposes to rationalise it and make it function faster. The website would also function faster with a smaller dataset and/or less types of religious group.

The author of this website has no objection to people downloading and reusing/adapting his code. The code has been fully commented, so should be simple for people with the relevant skills to adapt. For adaptation purposes, the map webpage within the container on the main page can be found here.

Resources used

  • Google Maps Javascript API V3 - This is the main resource used in the construction of this website, comprising a tutorial and documentation regarding the Google Maps Javascript development API (Application Programming Interface).
  • W3 Schools HTML guide - A tutorial and useful guidance on constructing HTML code.
  • W3 Schools Javascript guide - A tutorial and useful guidance on constructing Javascript code.
  • Javascript Madness - Excellent hints and tips on common problems and pitfalls in Javascript programming.
  • W3C Markup Validation Service - This website is used to check whether HTML code complies with the various guidelines with which it is ideally supposed to comply.
  • MyGeodata Converter - This website provides a tool that enables users to quickly convert geographic data files between data formats.

Share this page: