[guadec-web] Trying to set up the webmap from http://bl.ocks.org/jsanz/1bc2f6a9c998fbc014bc1820dcb2c76d



commit 97b02aba5aa184c9c9a36e7dec03d6ab8cefb637
Author: Ismael Olea <ismael olea org>
Date:   Thu Jun 14 12:43:49 2018 +0200

    Trying to set up the webmap from http://bl.ocks.org/jsanz/1bc2f6a9c998fbc014bc1820dcb2c76d

 content/pages/test-map.md | 36 ++++++++++++++++++++++++++++--------
 1 file changed, 28 insertions(+), 8 deletions(-)
---
diff --git a/content/pages/test-map.md b/content/pages/test-map.md
index b276b67..11837b7 100644
--- a/content/pages/test-map.md
+++ b/content/pages/test-map.md
@@ -4,14 +4,34 @@ Date: 20180219
 ## OSM Map test with leaflet
 
 <div id="map" style="width: 100%; height: 600px;"></div>
+
 <script>
-    var map = L.map('map').setView([36.8429, -2.4415], 14);
 
-    L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
-        attribution: '&copy; <a href="https://www.openstreetmap.org/copyright";>OpenStreetMap</a> 
contributors'
-    }).addTo(map);
+       var planes = [
+               ["7C6B07",-40.99497,174.50808],
+               ["7C6B38",-41.30269,173.63696],
+               ["7C6CA1",-41.49413,173.5421],
+               ["7C6CA2",-40.98585,174.50659],
+               ["C81D9D",-40.93163,173.81726],
+               ["C82009",-41.5183,174.78081],
+               ["C82081",-41.42079,173.5783],
+               ["C820AB",-42.08414,173.96632],
+               ["C820B6",-41.51285,173.53274]
+               ];
+
+        var map = L.map('map').setView([-41.3058, 174.82082], 8);
+        mapLink = 
+            '<a href="http://openstreetmap.org";>OpenStreetMap</a>';
+        L.tileLayer(
+            'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
+            attribution: '&copy; ' + mapLink + ' Contributors',
+            maxZoom: 18,
+            }).addTo(map);
 
-    L.marker([36.83604, -2.44778]).addTo(map)
-        .bindPopup('MARKER TEXT INFO')
-        // .openPopup();
-</script>
+               for (var i = 0; i < planes.length; i++) {
+                       marker = new L.marker([planes[i][1],planes[i][2]])
+                               .bindPopup(planes[i][0])
+                               .addTo(map);
+               }
+               
+</script>
\ No newline at end of file


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]