I am trying to call a function after a leaflet map has successfully loaded, working with leaflet 1.0.1. Regarding to the docs there is a map event named load
which states: Fired when the map is initialized (when its center and zoom are set for the first time). So this snipped should fire, if the map has loaded, but that never happens:
function onMapLoad() {
alert("Map successfully loaded")
};
mymap.on('load', onMapLoad);
There is no error or response, simple nothing. So why is the map-load event not working properly ?
Here goes a simple JS FIDDLE.