Hi,
I am using the Marker Cluster plugin and am having problems on displaying markers which are at the exact same location. In the example shown at
http://leaflet.github.io/Leaflet.markercluster/example/marker-clustering-realworld.388.html , i see that for markers on exact same location upon clicking there is a spider effect and the markers arrange in a circle and user can click each one. For some reason it is not happening on mine, it only shows one marker for all features for that location. I cannot figure out what i am doing wrong. My code is below:
var geoJson = jQuery.parseJSON(response);
var map = L.mapbox.map('map', 'kavinmehta.map-bhrg0jfe',{tileLayer: {detectRetina: true}}).setView([CENTERLAT, CENTERLONG], 14).addControl(L.mapbox.geocoderControl('kavinmehta.map-bhrg0jfe'));
var geojson = L.geoJson(geoJson, {
onEachFeature: function (feature, layer) {
var popupContent ='';
if (feature.properties && feature.properties.description) {
if (feature.properties.title) {
popupContent += "<b><u>" + feature.properties.title+ "</u></b></br>";
}
popupContent+=feature.properties.description;
layer.bindPopup(popupContent,{
closeButton: false
});
}
}
});
var markers = L.markerClusterGroup();
markers.addLayer(geojson);
map.addLayer(markers);