i'm working with a hudge amount of data, that's why i decided to use clustermarker on my leaflet map :
function CickOnPoint (e) {
var pm = e.target.feature.properties.distCoupe;//recupère dist coupe depuis geojson
var ind = findPosSlideIndex(pm);
currentSlide(ind);
}
function onEachPoint (feature,layer){
layer.on({click: CickOnPoint});
//marker pour cluster
var coordinates = feature.geometry.coordinates;
var latlng = new L.LatLng(coordinates[1], coordinates[0]);
var marker = L.marker(latlng);
marker.bindPopup("SURPRISE MOTHERFUCKER");
return marker;
}
var geo_point = L.geoJSON(point_layer_WGS84_dist, {
onEachFeature: onEachPoint
});
var clusters = new L.MarkerClusterGroup({
chunkedLoading: true,
disableClusteringAtZoom: 19,
spiderfyOnMaxZoom: false
});
clusters.addLayer(geo_point);
map.addLayer(clusters);
I can't understand why no popup is showing when i click on markers, but the fonction "clickOnPoint", which control a picture viewer does work.
I'm maybe missing a comprehension point in here.