From 0a61d18ba0088b378fcfab6498b3a1c42f9c029f Mon Sep 17 00:00:00 2001 From: Kumar Damani Date: Thu, 28 Feb 2019 00:40:15 -0700 Subject: sending geo data to front end, displaying it as markers, and taken out schema defs from index into models folder --- web/public/javascripts/map.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'web/public/javascripts/map.js') 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("

City Hall (not really)

Toronto, ON
Information about city hall.

"); - -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) -- cgit v1.2.3