diff options
| author | Kumar Damani <kumar.damani@mail.utoronto.ca> | 2019-02-28 07:40:15 +0000 |
|---|---|---|
| committer | Kumar Damani <kumar.damani@mail.utoronto.ca> | 2019-02-28 07:40:15 +0000 |
| commit | 0a61d18ba0088b378fcfab6498b3a1c42f9c029f (patch) | |
| tree | 2dc863825deba71b4e683619705f02a8d685967f /web/public/javascripts/map.js | |
| parent | 197f2f42091b691feb7c31308dbfc9ddde07a10f (diff) | |
sending geo data to front end, displaying it as markers, and taken out schema defs from index into models folder
Diffstat (limited to 'web/public/javascripts/map.js')
| -rw-r--r-- | web/public/javascripts/map.js | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/web/public/javascripts/map.js b/web/public/javascripts/map.js index 5e5a303..70c1419 100644 --- a/web/public/javascripts/map.js +++ b/web/public/javascripts/map.js @@ -12,10 +12,11 @@ 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(dumbpoints, { + pointToLayer: function (feature, latlng) { + //return L.circleMarker(latlng); + return L.marker(latlng); + } +}).bindPopup(function (layer) { + return layer.feature.geometry.another; +}).addTo(map) |
