I'm trying to change some things on a map that is already initialised by another script, using the Leaflet library. This other script did not store the map-object in a global variable, or in any other location I can access with my script. So currently there is a map on my page, but I don't have the map object.
What I'd like to do is to retrieve the object of an already-initialised map, to make changes to it. For example, if there'd exist a function L.getMap('myID') I'd like to use such a method to retrieve the map object linked to the container myID.
TL;DR: Is there a way to get a map object of an already-initialised leaflet map, using the id of the container?
mapvariable anywhere accessible. - Joeytje50window.mapsvariable is created with a list of maps. I don't know whether this contains map objects or simply a list of (to be initiated) maps... - Sidney Gijzen