Understand the method of marker clustering but unable to find the right solution for external geojson. I have tried various cluster plugins but nothing seems to work. See example map here.
var geojsonLayer = new L.GeoJSON.AJAX("https://raw.githubusercontent.com/marinespatialviz/marinespatialviz/master/litter.geojson", {
pointToLayer: function(feature, yx) {
var icon = L.icon({
iconUrl: feature.properties.gx_media_links,
iconSize: [40, 40]});
var marker = L.marker(yx, {icon: icon});
marker.bindTooltip('<p>' + feature.properties.description + '</p>');
return marker;
}
}).addTo(map);
var marker = L.markerClusterGroup();
marker.addLayer(geojsonLayer);
map.addLayer(marker);