diff --git a/app/assets/javascripts/maps.js.coffee b/app/assets/javascripts/maps.js.coffee index ea63cf8c..b194ff32 100644 --- a/app/assets/javascripts/maps.js.coffee +++ b/app/assets/javascripts/maps.js.coffee @@ -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')] diff --git a/config/locales/views/en.yml b/config/locales/views/en.yml index 6ff3db28..5f15b9db 100644 --- a/config/locales/views/en.yml +++ b/config/locales/views/en.yml @@ -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