I'm trying to display each map marker's tooltip onload without the need to hover or click to reveal it. Here is my attempt to chain the openPopup function to bindPopup:
function onEachFeature(feature, layer) {
if (feature.properties && feature.properties.popupContent) {
popupContent = feature.properties.popupContent;
}
layer.bindPopup(popupContent).openPopup();
}
But the tooltips do not appear unless clicked.
I see that this page of documentation offers the following function, but it is only for a single marker, not multiple ones.
marker.eachLayer(function(m) {
m.openPopup();
});
How do I display all markers onload?