Hi All, I hope this is the right place to ask this question: I have just installed leaflet/cloudmap for the first time and while the map appears to works as it should, I get the error that “Map container is already initialized. (7 out of range 4),” Having searched on the web, some people say that the map div is being created twice (I couldn’t see this myself). Does anyone know how to fix this bug? All help is much appreciated! Thanks, Lee |
Before initializing map check for is the map is already initiated or not var container = L.DomUtil.get('map'); if(container != null){ container._leaflet_id = null; } answered 26 Apr '18, 05:42 Dipin Raj C |
Perhaps pastebin the code (or if it's small, add it as a comment here - Richard's example here is only 15 lines long, after all)
Hi,
The code is as follows, it is the basic code example. it does sit within a page that also does a JSON call etc.
Much appreciated!