Is this possible at all? This is my code so far
var marker = L.geoJSON(geojsonFeatureCamera, {
pointToLayer: function (feature, latlng) {
return L.circleMarker(latlng, geojsonMarkerOptionsCamera);
},
onEachFeature: function(feature, layer) {
layer.on('mouseover', function(e) {
do_something();
});
}
});
I am able to do_something. E.g. open een Popup or write something to console. But I would like to open an image (of which the name is in feature.image) with FancyBox 5. And I am totally stuck on how to do that. Can somebody help me with this?
Thanks in advance!
Could not find any results regarding Fancybox5 in Google.
feature.show
is a link to image, then it would be as simple asFancybox.show([{ src: feature.show} ]);
. If you want to know how to add click event, then try googling "leaflet marker click event", you will find samples.