Are you interested in creating a web-mapping viewer or application? Do any of the Library’s web-mapping applications have functions or interfaces you need? If the answer to these questions is yes, then you may be interested to know that the code behind all of our web-mapping applications is available for free and easy onward use on Github.
Over the last six years, all our web-mapping applications have been based on open-source technologies, particularly GeoServer and OpenLayers. One of the advantages of this is that it fosters collaborative development of the code and applications. Another advantage is that it reduces or eliminates the costs of licensing proprietary software. Open-source technology also democratises the development of the applications themselves – they are not in the hands of an external “expert” – and the applications should also be more future-proof and stable with a widespread user community supporting their ongoing maintenance.
GitHub is a widely used code hosting platform and all our main map viewers are placed in specific repositories there. In each repository, you can easily download all the files to create an immediate working web-mapping application, just like those illustrated below. The Javascript code which drives all these applications is also commented for easy onward use.
The main viewers we have put there are:
- Find by Place – https://github.com/NationalLibraryOfScotland/NLSFindByPlaceOL3
This is a lightweight version of the main application we use to find all of our online maps using GeoServer and OpenLayers. Searching is possible by zooming in on the map, with options to change the base layer. Searching is also possible by using a Nominatim gazetteer, a British National Grid Reference, as well as historic county and parish drop-down lists.
The boundaries of historic maps are held as shapefiles within GeoServer, pre-rendered using GeoWebCache and customised for display using GeoServer. Clicking on the map initiates a Web Feature Service request to GeoServer, returning features that intersect with the point clicked upon.
2. Find by Place – with Marker – https://github.com/NationalLibraryOfScotland/FindbyPlace—with-Marker
A new search interface, introduced this year, using the Google Maps Javascript API and GeoServer to form a basic search and retrieval interface. Searching is possible using the Google Places API Web Service, or by zooming in on the map, with an option to change the map base layer between Google Maps or Satellite layers. The location of the marker initiates a Web Feature Service request to GeoServer, returning records for maps whose bounding boxes cover the marker location. A jQuery slider provides a way of narrowing the date range of the returned maps.
3. Explore Georeferenced Maps – https://github.com/NationalLibraryOfScotland/NLSExploreGeoreferencedMapsOL3
This is the basis of our main Explore Georeferenced Maps application, and uses OpenLayers, a Boostrap / JQuery transparency slider and three sample MapTiler georeferenced mosaics to form a viewer for historical georeferenced map mosaics. There are similar gazetteer search options to Find by Place, and additional OpenLayers tools such as measure and draw.
4. Side-by-Side viewer – https://github.com/NationalLibraryOfScotland/SidebySideOL3
A split-screen / dual-map window viewer for comparing historical georeferenced map mosaics to present-day satellite or map layers. This is the basis of our Side-by-Side viewer and our Scotland – Land-Use Viewer.
We continue to develop these viewers and use some of their functions to create dedicated interfaces for other Library collections beyond maps, for example:
- Thomas Annan’s photographs of mid-19th century Glasgow
- Henrietta Liston’s diaries recording travels in North America, 1796-1801
- Thomas Pennant’s Tours to Scotland, 1769 and 1772
- Lesmahagow Place Names Database
- GB1900 gazetteer of place names from Ordnance Survey 1900s maping
Geographic or map-based interfaces are a particularly useful and engaging way of making available library and archive collections online, and we hope that other institutions may find these applications useful. We also welcome comments or code to develop and improve our own map viewers.