hello!
I use the following code to create the map
'''
self.map = L.map(self.mapWidget)
self.map.setView([50.1364092, 8.5991296], zoom)
L.tileLayer("https://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png").addTo( self.map)
'''
But I wanted to create two maps, so I called the above code twice. But the map created by the second is gray and shows nothing.
Then I read ”evented.py“ this file。
I found that there was a problem with this " if Evented.mapWidget: return"
because Evented.mapWidget is not None,so it return.
Then before "self.map = L.map(self.mapWidget)",
add this line "pyqtlet2.leaflet.core.Evented.mapWidget = None"
Now both maps show ok.
But the first created map can't be right-clicked to add markers
Hi there, I just looked into it and it seems like I found a solution! I'll be testing it on the connected branch and release a version 0.9.0 with the feature!
hello! I use the following code to create the map ''' self.map = L.map(self.mapWidget) self.map.setView([50.1364092, 8.5991296], zoom) L.tileLayer("https://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png").addTo( self.map) ''' But I wanted to create two maps, so I called the above code twice. But the map created by the second is gray and shows nothing. Then I read ”evented.py“ this file。 I found that there was a problem with this " if Evented.mapWidget: return" because Evented.mapWidget is not None,so it return.
Then before "self.map = L.map(self.mapWidget)", add this line "pyqtlet2.leaflet.core.Evented.mapWidget = None" Now both maps show ok. But the first created map can't be right-clicked to add markers