JaWeilBaum / pyqtlet2

pyqtlet2 extends pyqtlet which initially brought Leaflet maps to PyQt5 and PySide6.
Other
37 stars 19 forks source link

KeyError: 'options' #42

Closed xukegithub closed 1 year ago

xukegithub commented 1 year ago

layer.py

 def bindPopup(self, content, options=None):
        js = '{layerName}.bindPopup("{content}"'.format(
                layerName=self._layerName, content=content)
        if options:
            js += ', {options}'.format(self._stringifyForJs(options))
        js += ')'
        self.runJavaScript(js)
        return self

when called marker.bindPopup(' ', {'autoPan': False}) , then throw js += ', {options}'.format(self._stringifyForJs(options)) KeyError: 'options'

js += ', {options}'.format(options=self._stringifyForJs(options)) is ok

JaWeilBaum commented 1 year ago

Hey, thanks for the bug report! Never used the options kwarg there. I'll fix this!

xukegithub commented 1 year ago

thanks