--- /dev/null
+$(document).ready(function () {
+ // Create a map
+ var map = L.map("map").fitBounds([[49.85,-10.5], [58.75, 1.9]]);
+
+ // Create NPE layer
+ var npe = L.tileLayer("https://{s}.ooc.openstreetmap.org/npe/{z}/{x}/{y}.png", {
+ minZoom: 6,
+ maxZoom: 15
+ });
+
+ // Create NPE Scotland layer
+ var npescotland = L.tileLayer("https://{s}.ooc.openstreetmap.org/npescotland/{z}/{x}/{y}.jpg", {
+ minZoom: 6,
+ maxZoom: 15
+ });
+
+ // Create 7th edition layer
+ var os7 = L.tileLayer("https://{s}.ooc.openstreetmap.org/os7/{z}/{x}/{y}.jpg", {
+ minZoom: 3,
+ maxZoom: 14
+ });
+
+ // Create 1st edition layer
+ var os1 = L.tileLayer("https://{s}.ooc.openstreetmap.org/os1/{z}/{x}/{y}.jpg", {
+ minZoom: 6,
+ maxZoom: 17
+ });
+
+ // Add OpenStreetMap layer
+ var osm = L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", {
+ 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>",
+ maxZoom: 18
+ });
+
+ // Create a layer switcher
+ var layers = L.control.layers({
+ "OS NPE (Eng/Wales 1945-55) 1:50k": npe,
+ "OS NPE/7th (Scotland) 1:50k": npescotland,
+ "OS 7th Series (1947-60) 1:50k": os7,
+ "OS 1st Edition (1946-60) 1:25k": os1,
+ "OpenStreetMap": osm
+ } , null, {
+ collapsed: false
+ }).addTo(map);
+
+ // Add the NPE layer to the map
+ npe.addTo(map);
+});
--- /dev/null
+/**
+ * Namespace: Util.OOC
+ */
+OpenLayers.Util.OOC = {};
+
+/**
+ * @requires OpenLayers/Layer/XYZ.js
+ *
+ * Class: OpenLayers.Layer.NPE
+ *
+ * Inherits from:
+ * - <OpenLayers.Layer.XYZ>
+ */
+OpenLayers.Layer.NPE = OpenLayers.Class(OpenLayers.Layer.XYZ, {
+ /**
+ * Constructor: OpenLayers.Layer.NPE
+ *
+ * Parameters:
+ * name - {String}
+ * url - {String}
+ * options - {Object} Hashtable of extra options to tag onto the layer
+ */
+ initialize: function(name, options) {
+ var url = [
+ "http://a.ooc.openstreetmap.org/npe/${z}/${x}/${y}.png",
+ "http://b.ooc.openstreetmap.org/npe/${z}/${x}/${y}.png",
+ "http://c.ooc.openstreetmap.org/npe/${z}/${x}/${y}.png"
+ ];
+ options = OpenLayers.Util.extend({
+ numZoomLevels: 16,
+ transitionEffect: "resize",
+ sphericalMercator: true
+ }, options);
+ var newArguments = [name, url, options];
+ OpenLayers.Layer.XYZ.prototype.initialize.apply(this, newArguments);
+ },
+
+ CLASS_NAME: "OpenLayers.Layer.NPE"
+});
+
+/**
+ * @requires OpenLayers/Layer/XYZ.js
+ *
+ * Class: OpenLayers.Layer.OS7
+ *
+ * Inherits from:
+ * - <OpenLayers.Layer.XYZ>
+ */
+OpenLayers.Layer.OS7 = OpenLayers.Class(OpenLayers.Layer.XYZ, {
+ /**
+ * Constructor: OpenLayers.Layer.OS7
+ *
+ * Parameters:
+ * name - {String}
+ * url - {String}
+ * options - {Object} Hashtable of extra options to tag onto the layer
+ */
+ initialize: function(name, options) {
+ var url = [
+ "http://a.ooc.openstreetmap.org/os7/${z}/${x}/${y}.jpg",
+ "http://b.ooc.openstreetmap.org/os7/${z}/${x}/${y}.jpg",
+ "http://c.ooc.openstreetmap.org/os7/${z}/${x}/${y}.jpg"
+ ];
+ options = OpenLayers.Util.extend({
+ numZoomLevels: 15,
+ transitionEffect: "resize",
+ sphericalMercator: true
+ }, options);
+ var newArguments = [name, url, options];
+ OpenLayers.Layer.XYZ.prototype.initialize.apply(this, newArguments);
+ },
+
+ CLASS_NAME: "OpenLayers.Layer.OS7"
+});
+
+/**
+ * @requires OpenLayers/Layer/XYZ.js
+ *
+ * Class: OpenLayers.Layer.OS1
+ *
+ * Inherits from:
+ * - <OpenLayers.Layer.XYZ>
+ */
+OpenLayers.Layer.OS1 = OpenLayers.Class(OpenLayers.Layer.XYZ, {
+ /**
+ * Constructor: OpenLayers.Layer.OS1
+ *
+ * Parameters:
+ * name - {String}
+ * url - {String}
+ * options - {Object} Hashtable of extra options to tag onto the layer
+ */
+ initialize: function(name, options) {
+ var url = [
+ "http://a.ooc.openstreetmap.org/os1/${z}/${x}/${y}.jpg",
+ "http://b.ooc.openstreetmap.org/os1/${z}/${x}/${y}.jpg",
+ "http://c.ooc.openstreetmap.org/os1/${z}/${x}/${y}.jpg"
+ ];
+ options = OpenLayers.Util.extend({
+ numZoomLevels: 18,
+ transitionEffect: "resize",
+ sphericalMercator: true
+ }, options);
+ var newArguments = [name, url, options];
+ OpenLayers.Layer.XYZ.prototype.initialize.apply(this, newArguments);
+ },
+
+ CLASS_NAME: "OpenLayers.Layer.OS1"
+});
+
+/**
+ * @requires OpenLayers/Layer/XYZ.js
+ *
+ * Class: OpenLayers.Layer.NPEScotland
+ *
+ * Inherits from:
+ * - <OpenLayers.Layer.XYZ>
+ */
+OpenLayers.Layer.NPEScotland = OpenLayers.Class(OpenLayers.Layer.XYZ, {
+ /**
+ * Constructor: OpenLayers.Layer.NPEScotland
+ *
+ * Parameters:
+ * name - {String}
+ * url - {String}
+ * options - {Object} Hashtable of extra options to tag onto the layer
+ */
+ initialize: function(name, options) {
+ var url = [
+ "http://a.ooc.openstreetmap.org/npescotland/${z}/${x}/${y}.jpg",
+ "http://b.ooc.openstreetmap.org/npescotland/${z}/${x}/${y}.jpg",
+ "http://c.ooc.openstreetmap.org/npescotland/${z}/${x}/${y}.jpg"
+ ];
+ options = OpenLayers.Util.extend({
+ numZoomLevels: 16,
+ transitionEffect: "resize",
+ sphericalMercator: true
+ }, options);
+ var newArguments = [name, url, options];
+ OpenLayers.Layer.XYZ.prototype.initialize.apply(this, newArguments);
+ },
+
+ CLASS_NAME: "OpenLayers.Layer.NPEScotland"
+});
+
--- /dev/null
+# DO NOT EDIT - This file is being maintained by Chef
+
+<VirtualHost *:443>
+ ServerName ooc.openstreetmap.org
+ ServerAlias a.ooc.openstreetmap.org
+ ServerAlias b.ooc.openstreetmap.org
+ ServerAlias c.ooc.openstreetmap.org
+ ServerAdmin webmaster@openstreetmap.org
+
+ SSLEngine on
+ SSLCertificateFile /etc/ssl/certs/ooc.openstreetmap.org.pem
+ SSLCertificateKeyFile /etc/ssl/private/ooc.openstreetmap.org.key
+
+ CustomLog /var/log/apache2/ooc.openstreetmap.org-access.log combined
+ ErrorLog /var/log/apache2/ooc.openstreetmap.org-error.log
+
+ DocumentRoot /srv/ooc.openstreetmap.org/html
+ Alias /npe/ /home/ooc/npe/
+ Alias /npescotland/ /home/ooc/npescotland/
+ Alias /os7/ /home/ooc/os7/
+ Alias /os1/ /home/ooc/os1/
+</VirtualHost>
+
+<VirtualHost *:80>
+ ServerName ooc.openstreetmap.org
+ ServerAlias a.ooc.openstreetmap.org
+ ServerAlias b.ooc.openstreetmap.org
+ ServerAlias c.ooc.openstreetmap.org
+ ServerAdmin webmaster@openstreetmap.org
+
+ CustomLog /var/log/apache2/ooc.openstreetmap.org-access.log combined
+ ErrorLog /var/log/apache2/ooc.openstreetmap.org-error.log
+
+ RedirectPermanent /.well-known/acme-challenge/ http://acme.openstreetmap.org/.well-known/acme-challenge/
+ RedirectPermanent / https://ooc.openstreetmap.org/
+</VirtualHost>
+
+<VirtualHost *:80>
+ ServerName npe.openstreetmap.org
+ ServerAdmin webmaster@openstreetmap.org
+
+ CustomLog /var/log/apache2/npe.openstreetmap.org-access.log combined
+ ErrorLog /var/log/apache2/npe.openstreetmap.org-error.log
+
+ RewriteEngine on
+ RewriteRule ^/robots.txt$ https://ooc.openstreetmap.org/robots.txt [R=permanent]
+ RewriteRule ^/openlayers/NPE.js$ https://ooc.openstreetmap.org/openlayers/OOC.js [R=permanent]
+ RewriteRule ^/(.*)$ https://ooc.openstreetmap.org/npe/$1 [R=permanent]
+</VirtualHost>
+
+<Directory /srv/ooc.openstreetmap.org/html>
+ Require all granted
+</Directory>
+
+<Directory /home/ooc>
+ Require all granted
+</Directory>