Attempt to modify the map gridSize

This commit is contained in:
echarp 2015-03-01 16:50:02 +01:00
parent abaa1536dd
commit 435698d53b
2 changed files with 8 additions and 8 deletions

View File

@ -1,3 +1,4 @@
# Setting up OpenStreeMap from a generic #map element
$(document).ready -> $(document).ready ->
$('#map.events').each -> $('#map.events').each ->
map = L.map 'map' map = L.map 'map'
@ -19,7 +20,7 @@ $(document).ready ->
if (feature.properties && feature.properties.popupContent) if (feature.properties && feature.properties.popupContent)
layer.bindPopup feature.properties.popupContent layer.bindPopup feature.properties.popupContent
map.addLayer L.markerClusterGroup().addLayer layer map.addLayer L.markerClusterGroup({gridSize: 10}).addLayer layer
if (layer.getBounds()._northEast && layer.getBounds()._southWest) if (layer.getBounds()._northEast && layer.getBounds()._southWest)
# Automatic focus to all displayed events # Automatic focus to all displayed events
@ -49,6 +50,6 @@ $(document).ready ->
if (feature.properties && feature.properties.popupContent) if (feature.properties && feature.properties.popupContent)
layer.bindPopup(feature.properties.popupContent) layer.bindPopup(feature.properties.popupContent)
map.addLayer L.markerClusterGroup().addLayer layer map.addLayer L.markerClusterGroup({gridSize: 10}).addLayer layer
marker = L.marker([coord[0], coord[1]]).addTo map marker = L.marker([coord[0], coord[1]]).addTo map

View File

@ -14,12 +14,11 @@
&.event &.event
height: 20em height: 20em
.tags .tags #map
#map width: 40%
width: 40% height: 60em
height: 60em margin: 1.6em 2%
margin: 1.6em 2% +inline-block()
+inline-block()
html.iframe #map html.iframe #map
width: 100% width: 100%