From: Tom Hughes Date: Thu, 5 Jan 2017 00:22:15 +0000 (+0000) Subject: Add HTML/JS/CSS for gps.tile.openstreetmap.org site X-Git-Url: https://git.openstreetmap.org/chef.git/commitdiff_plain/80d41d39e7490be63e81aebbca4987e4ff12f90d?hp=de935728632b0969362c56e9f66d13295bde91f8 Add HTML/JS/CSS for gps.tile.openstreetmap.org site --- diff --git a/cookbooks/gps-tile/files/default/html/index.html b/cookbooks/gps-tile/files/default/html/index.html new file mode 100644 index 000000000..f8482d3c4 --- /dev/null +++ b/cookbooks/gps-tile/files/default/html/index.html @@ -0,0 +1,15 @@ + + + + + gps.tile.openstreetmap.org + + + + + + + +
+ + diff --git a/cookbooks/gps-tile/files/default/html/map.css b/cookbooks/gps-tile/files/default/html/map.css new file mode 100644 index 000000000..0a22de636 --- /dev/null +++ b/cookbooks/gps-tile/files/default/html/map.css @@ -0,0 +1,7 @@ +#map { + position: absolute; + top: 0px; + bottom: 0px; + left: 0px; + right: 0px; +} diff --git a/cookbooks/gps-tile/files/default/html/map.js b/cookbooks/gps-tile/files/default/html/map.js new file mode 100644 index 000000000..af3b0d997 --- /dev/null +++ b/cookbooks/gps-tile/files/default/html/map.js @@ -0,0 +1,13 @@ +$(document).ready(function () { + // Create a map + var map = L.map("map"); + + // Add GPS tile layer + L.tileLayer("//gps-{s}.tile.openstreetmap.org/gps-lines/tile/{z}/{x}/{y}.png", { + attribution: "© OpenStreetMap and contributors, under an open license", + maxZoom: 18 + }).addTo(map); + + // SHow the whole world + map.fitWorld(); +});