I have a geojson layer in leaflet and I would like to trigger a popup on a specific feature. When declaring the geoJson layer I already have an onEachFeature property which will trigger the popup on click. This works great.
onEachFeature: function (feature, layer) {
layer.bindPopup('<div><h1>' + feature.properties.name + '</h1></div><div>' + feature.properties.description + '</div>');
}
I would like to trigger this popup programmatically though, say on an event. How would I go about that?
Thanks!