aboutsummaryrefslogtreecommitdiff
path: root/web/public/javascripts
diff options
context:
space:
mode:
authorKumar Damani <kumar.damani@mail.utoronto.ca>2019-02-28 17:32:26 +0000
committerKumar Damani <kumar.damani@mail.utoronto.ca>2019-02-28 17:32:26 +0000
commit9764fba35cdac7e226dad65f061c09fd3d9909cc (patch)
treeeaaef676ac4652a2b70902fd49ad1f4c65248a92 /web/public/javascripts
parent9eae2a3a228e9fb65970c1e61d9e4f4429def7a1 (diff)
displaying all the fields in the marker popup, better var namingfeat/7
Diffstat (limited to 'web/public/javascripts')
-rw-r--r--web/public/javascripts/map.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/web/public/javascripts/map.js b/web/public/javascripts/map.js
index 70c1419..190307d 100644
--- a/web/public/javascripts/map.js
+++ b/web/public/javascripts/map.js
@@ -12,11 +12,12 @@ L.tileLayer('https://stamen-tiles-{s}.a.ssl.fastly.net/toner-lite/{z}/{x}/{y}{r}
ext: 'png'
}).addTo(map);
-L.geoJson(dumbpoints, {
+L.geoJson(points, {
pointToLayer: function (feature, latlng) {
//return L.circleMarker(latlng);
return L.marker(latlng);
}
}).bindPopup(function (layer) {
- return layer.feature.geometry.another;
+ // layer.feature.geometry gives you access to all the fields
+ return "<p>" + JSON.stringify(layer.feature.geometry) + "</p>";
}).addTo(map)