After install pyqtlet2 using: pip3 install pyqtlet2[PySide6]
Running the example code (shown below) seems to result in an empty/grey screen (ui elements such as zoom control and markers are shown however).
I have tried various tiles providers; however, it did not help.
import os
import sys
os.environ['QT_API'] = 'pyside6'
from qtpy.QtWidgets import QApplication, QVBoxLayout, QWidget
from pyqtlet2 import L, MapWidget
class MapWindow(QWidget):
def __init__(self):
# Setting up the widgets and layout
super().__init__()
self.mapWidget = MapWidget()
self.layout = QVBoxLayout()
self.layout.addWidget(self.mapWidget)
self.setLayout(self.layout)
# Working with the maps with pyqtlet
self.map = L.map(self.mapWidget)
self.map.setView([12.97, 77.59], 10)
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png').addTo(self.map)
self.marker = L.marker([12.934056, 77.610029])
self.marker.bindPopup('Maps are a treasure.')
self.map.addLayer(self.marker)
self.show()
if __name__ == '__main__':
app = QApplication(sys.argv)
widget = MapWindow()
sys.exit(app.exec_())
I just re run my local tests and it seems to work on my side. Could you provide me some more information on your OS, version etc. And also what kind of logs do you get?
Hi!
After install pyqtlet2 using: pip3 install pyqtlet2[PySide6] Running the example code (shown below) seems to result in an empty/grey screen (ui elements such as zoom control and markers are shown however). I have tried various tiles providers; however, it did not help.