Correction pour avoir un markercluster fonctionnel

This commit is contained in:
echarp 2014-10-26 17:48:20 +01:00
parent 8d8c732504
commit ca688e0786

View File

@ -12,14 +12,12 @@ $(document).ready ->
# Does this feature have a property named popupContent?
if (feature.properties && feature.properties.popupContent)
layer.bindPopup feature.properties.popupContent
).addTo map
)
# Automatic focus to all displayed events
map.fitBounds layer.getBounds()
markers = L.markerClusterGroup()
markers.addLayer layer
map.addLayer markers
map.addLayer L.markerClusterGroup().addLayer layer
$('.events #map, .moderations #map').each ->
coord = [$(this).attr('latitude'), $(this).attr('longitude')]
@ -36,10 +34,8 @@ $(document).ready ->
# Does this feature have a property named popupContent?
if (feature.properties && feature.properties.popupContent)
layer.bindPopup(feature.properties.popupContent)
).addTo map
)
markers = L.markerClusterGroup()
markers.addLayer layer
map.addLayer markers
map.addLayer L.markerClusterGroup().addLayer layer
marker = L.marker([coord[0], coord[1]]).addTo map