1 $(document).ready(function () {
3 var map = L.map("map").fitBounds([[49.85,-10.5], [58.75, 1.9]]);
6 var npe = L.tileLayer("https://{s}.ooc.openstreetmap.org/npe/{z}/{x}/{y}.png", {
11 // Create NPE Scotland layer
12 var npescotland = L.tileLayer("https://{s}.ooc.openstreetmap.org/npescotland/{z}/{x}/{y}.jpg", {
17 // Create 7th edition layer
18 var os7 = L.tileLayer("https://{s}.ooc.openstreetmap.org/os7/{z}/{x}/{y}.jpg", {
23 // Create 1st edition layer
24 var os1 = L.tileLayer("https://{s}.ooc.openstreetmap.org/os1/{z}/{x}/{y}.jpg", {
29 // Add OpenStreetMap layer
30 var osm = L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", {
31 attribution: "© <a target=\"_parent\" href=\"https://www.openstreetmap.org\">OpenStreetMap</a> and contributors, under an <a target=\"_parent\" href=\"https://www.openstreetmap.org/copyright\">open license</a>",
35 // Create a layer switcher
36 var layers = L.control.layers({
37 "OS NPE (Eng/Wales 1945-55) 1:50k": npe,
38 "OS NPE/7th (Scotland) 1:50k": npescotland,
39 "OS 7th Series (1947-60) 1:50k": os7,
40 "OS 1st Edition (1946-60) 1:25k": os1,
46 // Add the NPE layer to the map