|
|
|
@ -7,13 +7,14 @@ $(document).ready ->
|
|
|
|
|
).addTo map
|
|
|
|
|
|
|
|
|
|
$.getJSON '/maps.json', (json) ->
|
|
|
|
|
L.geoJson(json,
|
|
|
|
|
layer = L.geoJson(json,
|
|
|
|
|
onEachFeature: (feature, layer) ->
|
|
|
|
|
# Does this feature have a property named popupContent?
|
|
|
|
|
if (feature.properties && feature.properties.popupContent)
|
|
|
|
|
layer.bindPopup(feature.properties.popupContent)
|
|
|
|
|
layer.bindPopup feature.properties.popupContent
|
|
|
|
|
).addTo map
|
|
|
|
|
|
|
|
|
|
map.fitBounds layer.getBounds()
|
|
|
|
|
|
|
|
|
|
$('.events #map, .moderations #map').each ->
|
|
|
|
|
coord = [$(this).attr('latitude'), $(this).attr('longitude')]
|
|
|
|
|