This workshop is now in the past, but this home page and applications will remain online for future reference or use.
These demonstration applications use OpenLayers 4.6 to build some basic applications for search and retrieval of series maps, as well as for displaying georeferenced maps.
All these applications below can be downloaded for local use and testing from: https://maps.nls.uk/projects/openlayers.zip
Please also see the accompanying background notes: https://maps.nls.uk/projects/geocart2018/GeoCart-Historical_Maps_Online_Workshop.pdf
The slides for the presentation are at: https://bit.ly/2MxI5C7
We start with three very basic OpenLayers map applications:
- Map 1 - a simple map using Open Street Map, centred on Wellington
- Map 2 - a simple map with three layers and a layerswitcher panel, centred on Wellington
- Map 3 - a set of historic map overlays and a choice of base layers, centred on Wellington
These are used to then develop the applications below:
1. Search and retrieval of series maps
1a. Find By Place GEOJSON - OpenLayers Search Viewer with GeoJSON graphic index
This builds on the initial demo applications above with the following features:
- Three layers of New Zealand topographic map series sheet boundaries held as GeoJSON files
- Separate styles of sheet boundaries and selected sheets
- Use of the OpenLayers map.forEachFeatureAtPixel method to select sheets, based on mouse hover over features
- Gazetteer search using OSMNames with autocomplete
- Layerswitchers for the GeoJSON overlays and base layers
- Customised ol.control.MousePosition
1b. Find By Place GeoServer - OpenLayers Search Viewer with GeoServer graphic index
This builds on the initial demo applications above with the following features:
- Three layers of New Zealand topographic map series sheet boundaries held within GeoServer
- Separate styles of sheet boundaries and selected sheets
- Use of Web Feature Service query to select sheets, activated by mouse click
- Gazetteer search using OSMNames with autocomplete
- Layerswitchers for the GeoServer overlays and base layers
- Customised ol.control.MousePosition
1c. Find By Place With Marker - OpenLayers Search Viewer using a Marker Pin
This builds on the initial demo applications above with the following features:
- Two layers of New Zealand topographic map series sheet boundaries held as GeoJSON files
- Use of the OpenLayers map.forEachFeatureAtPixel method to select sheets, based on the position of the marker pin
- Ability to alter position of marker pin on mouse click
- Use of a jQuery date slider to filter results based on map sheet date
- Use of maxExtent parameter to prevent panning away from New Zealand
2. Viewing and Interacting with georeferenced maps
2a. Explore Georeferenced Maps - OpenLayers Viewer for displaying georeferenced maps with transparency slider
This builds on the initial demo applications above with the following features:
- Three georeferenced maps as XYZ tileset overlay layers, prepared with MapTiler
- A jQuery Bootstrap transparency slider for the overlays
- Gazetteer search using OSMNames with autocomplete
- Layerswitchers for the historic map overlays and base layers
- Customised ol.control.MousePosition
2b. Side-by-Side / Split-screen viewer - OpenLayers Viewer for comparing georeferenced maps to each other
This builds on the initial demo applications above with the following features:
- This shares much in common with 2a, but displays maps side-by-side in a split-screen viewer for comparison
- There are two ol.Map classes for left and right, sharing the same view
- Three georeferenced maps as XYZ tileset overlay layers, prepared with MapTiler
- The position of the mouse is shown by a cross with a slave pointer in the other map window
- Layerswitchers for the historic map overlays and base layers
2c. Map spy viewer - OpenLayers viewer for georeferenced historic map mosaics viewed through a circular spyglass window
This builds on the initial demo applications above with the following features:
- This shares much in common with 2a, but displays the georeferenced historic map layers through a spy glass window
- Based on the OpenLayers Layer Spy example with an added jQuery Bootstrap slider to alter window radius
- Three georeferenced maps as XYZ tileset overlay layers, prepared with MapTiler
- Layerswitchers for the historic map overlays and base layers
2d. 3D viewer - OpenLayers Cesium viewer for georeferenced historic map mosaics
This builds on the initial demo applications above with the following features:
- This shares much in common with 2a, but displays the georeferenced historic map layers overlaid on 3D terrain
- Based on Cesium Javascript library, and OpenLayers Cesium integration project
- Three georeferenced maps as XYZ tileset overlay layers, prepared with MapTiler
- Layerswitchers for the historic map overlays and base layers
2e. ExploreGeoreferencedMapsPlus - Georeferenced layers with measurement tools, geolocation, a permalink URL, and an interactive marker
This builds on the 2a. Explore Georeferenced Maps application above with the following additional features:
- Measurement tools for distance and area, based on the OpenLayers Measure example
- Geolocation of the user device, using the OpenLayers Geolocation example and API
- A Permalink-style URL with zoom, lat, lon and marker parameters
- The ability to add, alter, or remove a marker on the map, with its position recorded in the URL
- A Zoom to this Map's Extent function