OpenLayers
PSGA Scotland members
Please replace references on this page to the domain viaeuropa.uk.com with publicsectormapping.gov.scot
OpenLayers is a mature, high-performance, feature-packed library for web-based mapping applications. The demos below load OpenLayers from a third party Content Distribution Network (CDN). For further information on OpenLayers, visit www.openlayers.org.
OpenLayers v7 - Single layer viewer
The following demos are provided as examples on how to access viaEuropa using OpenLayers v7. Please feel free to copy and adapt them to your requirements.
Tile XYZ
where:
{id} is your viaEuropa ID
{map} is the ID of the required map layer. e.g. m0100 (see Reference/Map Inventory)
OpenLayers v7 - Basemap with overlay viewer
Tile XYZ
https://tile.viaeuropa.uk.com/demos/openlayers7_overlay?id={id}&map={map}&olay={olay}&olay_opacity={olay_opacity}
where:
{id} is your viaEuropa ID
{map} is the ID of the required map layer. e.g. m0130 (see Reference/Map Inventory)
{olay} is the ID of the required overlay layer. e.g. m5020 (see Reference/Map Inventory)
{olay_opacity} is the opacity of the overlay layer (0.0 - 1.0). Optional, defaults to 1.0 (fully opaque).
OpenLayers v7 - viaEuropa "Time Machine" viewer
This OpenLayers-based demo shows a time series of OS Raster products (a combination of open and premium data) to create a virtual time machine. You can view any part of Great Britain over the supported calendar quarters (currently March 2017 to current quarter). The application presents a slider (bottom-centre) allowing the user to change the calendar quarter. The active period is shown in the bottom-right corner.
There are separate versions for British National Grid (BNG) and Spherical Mercator (SPM) projections. The SPM version works a little better as there is no "refresh flash" when changing the time period.
British National Grid (BNG)
Spherical Mercator (SPM)
where:
{id} is your viaEuropa ID