La carte des evts est automatiquement centrée et zoomée en fonction des evts pris en compte

This commit is contained in:
echarp 2014-09-20 18:41:19 +02:00
parent 8b3c580f33
commit d240cf25b1
2 changed files with 4 additions and 3 deletions

View File

@ -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')]

View File

@ -21,7 +21,7 @@ en:
suisse: Suisse
propose: Propose an event
feeds: RSS/iCal feed
map: map
map: Map
tags: Tags
infos: Informations
stats: Statistics