summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--map/kbh.mdwn398
-rw-r--r--templates/map.mdwn42
2 files changed, 3 insertions, 437 deletions
diff --git a/map/kbh.mdwn b/map/kbh.mdwn
index 837f01fb..6b12d9cf 100644
--- a/map/kbh.mdwn
+++ b/map/kbh.mdwn
@@ -7,402 +7,8 @@
else="""
# København
-[[!template stamen=toner-lite id=map bounds-nw="55.76846,12.45369" bounds-se="55.54883,12.67891" positionpopup=1]]
-<script>
-var polygon = L.polygon([
- [55.73275, 12.56572],
- [55.73247, 12.56692],
- [55.73054, 12.56748],
- [55.73009, 12.56836],
- [55.72909, 12.57631],
- [55.72954, 12.57648],
- [55.72776, 12.57587],
- [55.72289, 12.57769],
- [55.72165, 12.57746],
- [55.72165, 12.58291],
- [55.71251, 12.58621],
- [55.69607, 12.59308],
- [55.7011, 12.59643],
- [55.6951, 12.59359],
- [55.69916, 12.59153],
- [55.69607, 12.5796],
- [55.69094, 12.57136],
- [55.69621, 12.56149],
- [55.70647, 12.56278],
- [55.70352, 12.5584],
- [55.71009, 12.55497],
- [55.71106, 12.55325],
- [55.71466, 12.55879],
- [55.71913, 12.56437],
- [55.71986, 12.56261],
- [55.71986, 12.5613],
- [55.72191, 12.56355],
- [55.72242, 12.56136],
- [55.72533, 12.56162],
- [55.73127, 12.56357],
- [55.73131, 12.56424],
- [55.73124, 12.566]
-]).addTo(map);
-polygon.bindPopup("<a href=../../osterbro/>Ture på Østerbro</a>");
-</script>
-<script>
-var polygon = L.polygon([
- [55.69916, 12.59171],
- [55.69505, 12.59359],
- [55.69505, 12.6002],
- [55.68808, 12.59952],
- [55.67899, 12.59351],
- [55.66727, 12.57162],
- [55.66824, 12.57188],
- [55.67454, 12.56424],
- [55.67458, 12.56021],
- [55.67434, 12.55815],
- [55.68068, 12.56021],
- [55.68629, 12.56467],
- [55.69094, 12.57162],
- [55.69616, 12.57986]
-]).addTo(map);
-polygon.bindPopup("<a href=../../city/>Ture i Indre By</a>");
-</script>
-<script>
-var polygon = L.polygon([
- [55.69036, 12.63256],
- [55.67507, 12.64904],
- [55.66481, 12.63883],
- [55.63391, 12.65943],
- [55.63090, 12.68028],
- [55.60744, 12.67891],
- [55.60589, 12.66998],
- [55.59542, 12.67342],
- [55.59348, 12.68200],
- [55.58766, 12.67960],
- [55.55408, 12.59171],
- [55.60744, 12.50622],
- [55.64176, 12.55360],
- [55.66306, 12.58553],
- [55.66287, 12.59377],
- [55.66636, 12.5948],
- [55.66965, 12.58175],
- [55.67139, 12.5845],
- [55.66907, 12.5996],
- [55.67507, 12.61024],
- [55.68494, 12.6123]
-]).addTo(map);
-polygon.bindPopup("<a href=../../amager/>Ture på Amager</a>");
-</script>
-<script>
-var polygon = L.polygon([
- [55.72829, 12.52118],
- [55.72784, 12.52198],
- [55.72743, 12.52495],
- [55.72665, 12.52552],
- [55.72719, 12.52673],
- [55.727, 12.5275],
- [55.72713, 12.52962],
- [55.72698, 12.5332],
- [55.72714, 12.53514],
- [55.72632, 12.53948],
- [55.72421, 12.54104],
- [55.72364, 12.5425],
- [55.72355, 12.5442],
- [55.72374, 12.54439],
- [55.72384, 12.54553],
- [55.72355, 12.54667],
- [55.72375, 12.54875],
- [55.72388, 12.54926],
- [55.72371, 12.54958],
- [55.7238, 12.55025],
- [55.72351, 12.55173],
- [55.72336, 12.55379],
- [55.72257, 12.55426],
- [55.72245, 12.5613],
- [55.72188, 12.56345],
- [55.71986, 12.56126],
- [55.71982, 12.5619],
- [55.71967, 12.56235],
- [55.71982, 12.56261],
- [55.71912, 12.56433],
- [55.71137, 12.55327],
- [55.70828, 12.54465],
- [55.70662, 12.54184],
- [55.70375, 12.53911],
- [55.69807, 12.53669],
- [55.69749, 12.53604],
- [55.6973, 12.53214],
- [55.69679, 12.53214],
- [55.69684, 12.53016],
- [55.69597, 12.52984],
- [55.69558, 12.52759],
- [55.69677, 12.52562],
- [55.70186, 12.51952],
- [55.70664, 12.51592],
- [55.70842, 12.51175],
- [55.70949, 12.51257],
- [55.71043, 12.51272],
- [55.71181, 12.51205],
- [55.71385, 12.51568],
- [55.71577, 12.51652],
- [55.71712, 12.51645],
- [55.71767, 12.51439],
- [55.71771, 12.513],
- [55.71887, 12.51323],
- [55.71961, 12.51315],
- [55.72276, 12.51484],
- [55.72635, 12.51783],
- [55.72756, 12.5195]
-]).addTo(map);
-polygon.bindPopup("<a href=../../bispebjerg/>Ture på Bispebjerg</a>");
-</script>
-<script>
-var polygon = L.polygon([
- [55.66979, 12.57956],
- [55.66648, 12.5949],
- [55.66297, 12.59383],
- [55.66404, 12.58482],
- [55.65993, 12.57634],
- [55.65639, 12.56993],
- [55.64996, 12.56647],
- [55.64787, 12.56184],
- [55.64867, 12.55877],
- [55.66113, 12.56819]
-]).addTo(map);
-polygon.bindPopup("<a href=../../islandsbrygge/>Ture på Islands Brygge</a>");
-</script>
-<script>
-var polygon = L.polygon([
- [55.69805, 12.61943],
- [55.69747, 12.62951],
- [55.69466, 12.63046],
- [55.69256, 12.62544],
- [55.69017, 12.62393],
- [55.68842, 12.61376],
- [55.68704, 12.61359],
- [55.68683, 12.61883],
- [55.68511, 12.61273],
- [55.67967, 12.61406],
- [55.67393, 12.60982],
- [55.66948, 12.60037],
- [55.66764, 12.58965],
- [55.66858, 12.58239],
- [55.66989, 12.57956],
- [55.6747, 12.58793],
- [55.67833, 12.59664],
- [55.67771, 12.59879],
- [55.67923, 12.60063],
- [55.67754, 12.60767],
- [55.68373, 12.60947],
- [55.68736, 12.60823],
- [55.68925, 12.61055],
- [55.68997, 12.60621],
- [55.69728, 12.60836]
-]).addTo(map);
-polygon.bindPopup("<a href=../../christianshavn/>Ture på Christianshavn</a>");
-</script>
-<script>
-var polygon = L.polygon([
- [55.69748, 12.53594],
- [55.69701, 12.53544],
- [55.69524, 12.53446],
- [55.69375, 12.53609],
- [55.69137, 12.53622],
- [55.68763, 12.54126],
- [55.68633, 12.54491],
- [55.68516, 12.54720],
- [55.68475, 12.55355],
- [55.68388, 12.55529],
- [55.68199, 12.55778],
- [55.67381, 12.55536],
- [55.67235, 12.55563],
- [55.67271, 12.55156],
- [55.67259, 12.54969],
- [55.67020, 12.54023],
- [55.67018, 12.53767],
- [55.66778, 12.53025],
- [55.66655, 12.52364],
- [55.66991, 12.51111],
- [55.6689, 12.49626],
- [55.67231, 12.49527],
- [55.67233, 12.4954],
- [55.67248, 12.49304],
- [55.6771, 12.4924],
- [55.67945, 12.49274],
- [55.68327, 12.4948],
- [55.68792, 12.50429],
- [55.69082, 12.516],
- [55.69488, 12.52424],
- [55.69587, 12.52999],
- [55.69667, 12.5321],
- [55.69725, 12.53222]
-]).addTo(map);
-polygon.bindPopup("<a href=../../frederiksberg/>Ture på Frederiksberg</a>");
-</script>
-<script>
-var polygon = L.polygon([
- [55.70927, 12.61153],
- [55.70533, 12.61031],
- [55.69795, 12.6149],
- [55.69736, 12.60821],
- [55.68939, 12.60595],
- [55.68554, 12.60527],
- [55.68408, 12.60445],
- [55.68372, 12.60964],
- [55.6775, 12.60795],
- [55.6793, 12.60061],
- [55.67038, 12.58756],
- [55.6723, 12.58349],
- [55.66984, 12.57952],
- [55.66131, 12.56819],
- [55.6632, 12.5628],
- [55.66782, 12.57278],
- [55.67855, 12.59239],
- [55.67875, 12.59342],
- [55.68765, 12.59943],
- [55.69529, 12.59995],
- [55.69539, 12.59394],
- [55.70598, 12.59969]
-]).addTo(map);
-polygon.bindPopup("<a href=../../havnen/>Ture ved Københavns Havn</a>");
-</script>
-<script>
-var polygon = L.polygon([
- [55.67466, 12.5642],
- [55.66819, 12.57196],
- [55.66776, 12.57111],
- [55.6673, 12.57154],
- [55.66381, 12.56441],
- [55.66209, 12.5657],
- [55.65311, 12.55866],
- [55.65454, 12.55261],
- [55.65541, 12.5533],
- [55.65704, 12.5527],
- [55.65408, 12.53849],
- [55.65529, 12.53767],
- [55.66248, 12.54154],
- [55.66326, 12.53068],
- [55.66723, 12.52828],
- [55.67015, 12.53806],
- [55.67308, 12.54823],
- [55.67267, 12.54999],
- [55.67451, 12.54986],
- [55.67352, 12.55411],
- [55.67456, 12.56021],
- [55.67352, 12.56115]
-]).addTo(map);
-polygon.bindPopup("<a href=../../vesterbro/>Ture på Vesterbro</a>");
-</script>
-<script>
-var polygon = L.polygon([
- [55.69379, 12.536],
- [55.69447, 12.53549],
- [55.69524, 12.53446],
- [55.6966, 12.53566],
- [55.69713, 12.53557],
- [55.69807, 12.53673],
- [55.70103, 12.53785],
- [55.70376, 12.53909],
- [55.70659, 12.54192],
- [55.70826, 12.54463],
- [55.7113, 12.55334],
- [55.71004, 12.55506],
- [55.70361, 12.55772],
- [55.70313, 12.55875],
- [55.70642, 12.56252],
- [55.69636, 12.56166],
- [55.69171, 12.56948],
- [55.68726, 12.56278],
- [55.68208, 12.5578],
- [55.68475, 12.55385],
- [55.68538, 12.5469],
- [55.6876, 12.54141],
- [55.69108, 12.53643],
- [55.69287, 12.53557]
-]).addTo(map);
-polygon.bindPopup("<a href=../../norrebro/>Ture på Nørrebro</a>");
-</script>
-<script>
-var polygon = L.polygon([
- [55.67938, 12.49236],
- [55.67734, 12.49227],
- [55.67243, 12.49291],
- [55.67231, 12.49519],
- [55.6688, 12.49618],
- [55.66984, 12.51107],
- [55.6664, 12.52364],
- [55.6673, 12.52823],
- [55.66328, 12.53059],
- [55.66321, 12.52772],
- [55.66248, 12.5245],
- [55.65164, 12.52755],
- [55.65108, 12.52154],
- [55.65219, 12.51596],
- [55.64546, 12.52308],
- [55.64386, 12.52223],
- [55.64192, 12.52283],
- [55.63967, 12.52184],
- [55.63713, 12.52248],
- [55.63737, 12.52094],
- [55.63439, 12.50901],
- [55.64667, 12.49068],
- [55.65285, 12.48502],
- [55.65725, 12.47785],
- [55.67197, 12.47867],
- [55.67219, 12.47433],
- [55.67272, 12.47442],
- [55.67282, 12.48176],
- [55.67398, 12.48407],
- [55.67584, 12.48446]
-]).addTo(map);
-polygon.bindPopup("<a href=../../valby/>Ture i Valby</a>");
-</script>
-<script>
-var polygon = L.polygon([
- [55.69602, 12.5796],
- [55.69164, 12.58797],
- [55.69522, 12.59407],
- [55.69517, 12.60029],
- [55.68825, 12.59934],
- [55.68731, 12.59046],
- [55.6892, 12.58205],
- [55.68746, 12.57844],
- [55.6846, 12.57364],
- [55.67865, 12.56505],
- [55.68109, 12.56038],
- [55.68671, 12.56553],
- [55.69295, 12.5748]
-]).addTo(map);
-polygon.bindPopup("<a href=../../voldkvarter/>Ture i Københavns voldkvarterer</a>");
-</script>
-<script>
-var polygon = L.polygon([
- [55.66321, 12.5278],
- [55.66299, 12.53725],
- [55.66246, 12.54128],
- [55.65534, 12.53772],
- [55.65396, 12.53832],
- [55.65699, 12.55265],
- [55.65541, 12.55312],
- [55.65386, 12.55197],
- [55.65193, 12.55892],
- [55.6474, 12.553],
- [55.64716, 12.55621],
- [55.64183, 12.54862],
- [55.64054, 12.54969],
- [55.64011, 12.54883],
- [55.63148, 12.53128],
- [55.63548, 12.53111],
- [55.6373, 12.52544],
- [55.63689, 12.5227],
- [55.6396, 12.52192],
- [55.64178, 12.52291],
- [55.64374, 12.52227],
- [55.64548, 12.52313],
- [55.65197, 12.51622],
- [55.65101, 12.52145],
- [55.65164, 12.52772],
- [55.66246, 12.52454]
-]).addTo(map);
-polygon.bindPopup("<a href=../../sydvest/>Ture i Sydvestkvarteret</a>");
-</script>
+[[!template id=map]]
+
"""]]
[[!tag forside ]]
diff --git a/templates/map.mdwn b/templates/map.mdwn
index f3b907b1..8d0a0030 100644
--- a/templates/map.mdwn
+++ b/templates/map.mdwn
@@ -1,44 +1,4 @@
[[!meta stylesheet=map rel="stylesheet"]]
<div id="map"></div>
-<script src="/usr/share/javascript/leaflet/leaflet.js"></script>
-<script><TMPL_IF stamen>
-var attribOSM = 'Kartografi &copy; <a href="https://stamen.com/">Stamen Design</a>'
- +' under en <a href="https://creativecommons.org/licenses/by/3.0">Creative Commons Kreditering</a> licens.'
- +' Data &copy; <a href="https://www.openstreetmap.org/copyright#contributors">OpenStreetMap-bidragydere</a>'
- +' under <a href="http://opendatacommons.org/licenses/odbl/">ODbL</a> licens';
-var OSMLayer = L.tileLayer('https://stamen-tiles.a.ssl.fastly.net/<TMPL_VAR stamen>/{z}/{x}/{y}.png', { attribution: attribOSM } );<TMPL_ELSE><TMPL_IF stamen-old>
-var attribOSM = 'Kartografi &copy; <a href="https://stamen.com/">Stamen Design</a>'
- +' under en <a href="https://creativecommons.org/licenses/by/3.0">Creative Commons Kreditering</a> licens.'
- +' Data &copy; <a href="https://www.openstreetmap.org/copyright#contributors">OpenStreetMap-bidragydere</a>'
- +' under en <a href="http://creativecommons.org/licenses/by-sa/3.0">Creative Commons Kreditering-DelPåSammeVilkår</a> licens';
-var OSMLayer = L.tileLayer('https://stamen-tiles.a.ssl.fastly.net/<TMPL_VAR stamen-old>/{z}/{x}/{y}.png', { attribution: attribOSM } );<TMPL_ELSE>
-var attribOSM = 'Kartografi &copy; <a href="https://www.openstreetmap.org/copyright#contributors">OpenStreetMap-bidragydere</a>'
- +' under en <a href="https://creativecommons.org/licenses/by-sa/2.0/">Creative Commons Kreditering-DelPåSammeVilkår</a> licens.'
- +' Data &copy; <a href="http://osmfoundation.org/">OpenStreetMap Foundation</a>'
- +' under <a href="http://opendatacommons.org/licenses/odbl/">ODbL</a> licens';
-var OSMLayer = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { attribution: attribOSM } );</TMPL_IF></TMPL_IF>
-var Box = L.latLngBounds( [[<TMPL_VAR bounds-nw>],[<TMPL_VAR bounds-se>]] );
-var map = L.map('content', { layers: [OSMLayer] }).fitBounds(Box);
-map.attributionControl.setPrefix(false);
-
-L.control.scale({ imperial: false }).addTo(map);
-L.Icon.Default.imagePath = '/usr/share/javascript/leaflet/images/';
-
-<TMPL_IF positionpopup>
-function round(n,d) {
- return Math.round(Math.pow(10,d)*n)/Math.pow(10,d)
-};
-function latLngString(latLng) {
- return round(latLng.lat,5) + ", " + round(latLng.lng,5)
-};
-var popup = L.popup();
-function positionPopup(e) {
- popup
- .setLatLng(e.latlng)
- .setContent("Position (lat, long):<br>" + latLngString(e.latlng))
- .openOn(map);
-}
-map.on('contextmenu', positionPopup);
-</TMPL_IF>
-</script>
+<script src="js/lib/require.js" data-main="js/tours" type="text/javascript"></script>