aboutsummaryrefslogtreecommitdiff
path: root/web/public/javascripts/map.js
diff options
context:
space:
mode:
authorKumar Damani <kumar.damani@mail.utoronto.ca>2019-02-28 17:49:21 +0000
committerKumar Damani <kumar.damani@mail.utoronto.ca>2019-02-28 17:49:21 +0000
commit5dd172866ff87842db07e563b3cb77cc3c2577a8 (patch)
treee4691429ed02491fba13de2a1e5b5102b19ccd77 /web/public/javascripts/map.js
parent76214c83dc52d4dca6e5043fe374da57a54f9738 (diff)
parent9764fba35cdac7e226dad65f061c09fd3d9909cc (diff)
merged feat7 into temp
Diffstat (limited to 'web/public/javascripts/map.js')
-rw-r--r--web/public/javascripts/map.js16
1 files changed, 9 insertions, 7 deletions
diff --git a/web/public/javascripts/map.js b/web/public/javascripts/map.js
index 5e5a303..190307d 100644
--- a/web/public/javascripts/map.js
+++ b/web/public/javascripts/map.js
@@ -12,10 +12,12 @@ L.tileLayer('https://stamen-tiles-{s}.a.ssl.fastly.net/toner-lite/{z}/{x}/{y}{r}
ext: 'png'
}).addTo(map);
-// Create point feature for somewhere downtown
-var myDataPoint = L.marker([43.6529, -79.3849]).addTo(map);
-
-// Bind popup to Data Point object
-myDataPoint.bindPopup("<h3>City Hall (not really)</h3><p>Toronto, ON<br>Information about city hall.</p>");
-
-map.setZoom(13);
+L.geoJson(points, {
+ pointToLayer: function (feature, latlng) {
+ //return L.circleMarker(latlng);
+ return L.marker(latlng);
+ }
+}).bindPopup(function (layer) {
+ // layer.feature.geometry gives you access to all the fields
+ return "<p>" + JSON.stringify(layer.feature.geometry) + "</p>";
+}).addTo(map)