This page is currently undergoing maintenance
The OS Maps display will be restored as soon as possible.
Thank you for your patience.
var apiKey = 'YujFKUCKInwKlriGiywwTjGwnA5WukGF';
var serviceUrl = 'https://api.os.uk/maps/raster/v1/zxy';
// Create a map style object using the ZXY service. var style = { "version": 8, "sources": { "raster-tiles": { "type": "raster", "tiles": [ serviceUrl + "/Light_3857/{z}/{x}/{y}.png?key=" + apiKey ], "tileSize": 256, "maxzoom": 20 } }, "layers": [{ "id": "os-maps-zxy", "type": "raster", "source": "raster-tiles" }] };
// Initialize the map object. var map = new mapboxgl.Map({ container: 'map', minZoom: 6, maxZoom: 19, style: style, center: [ -2.968, 54.425 ], zoom: 13 });
map.dragRotate.disable(); // Disable map rotation using right click + drag. map.touchZoomRotate.disableRotation(); // Disable map rotation using touch rotation gesture.
// Add navigation control (excluding compass button) to the map. map.addControl(new mapboxgl.NavigationControl({ showCompass: false }));