Find Leaflet map object after initialisation

前端 未结 2 1613
被撕碎了的回忆
被撕碎了的回忆 2020-12-31 07:04

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 glob

2条回答
  •  没有蜡笔的小新
    2020-12-31 07:57

    You can access the map from the global array created by the mediawiki extension.

    Es: for accessing the first map of the page

    window.maps.leafletList[0].map.getCenter()
    

提交回复
热议问题