You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
``SimpleMapView``also provides a QML component based on ``QQuickItem`` instead of ``QWidget``. Since ``QQuickItem`` uses GPU-accelerated rendering, it offers better performance.
224
+
``SimpleMapView`` provides a QML component based on ``QQuickItem`` instead of ``QWidget``. Since ``QQuickItem`` uses GPU-accelerated rendering, it offers better performance.
224
225
225
226
To use the QML component, you need to enable it in your build system first.
226
227
@@ -303,6 +304,32 @@ Window {
303
304
304
305
```
305
306
307
+
308
+
## Python
309
+
310
+
To use ``SimpleMapView`` in ``PySide6`` applications, you have to build and install the **python module** by running ``pip install .`` command on the project's root.
311
+
312
+
Here is a simple example on how to use in python:
313
+
314
+
```py
315
+
import sys
316
+
from PySide6.QtWidgets import QApplication
317
+
from PySimpleMapView import SimpleMapView, TileServers, MapText
318
+
319
+
app = QApplication(sys.argv)
320
+
321
+
map_view = SimpleMapView()
322
+
map_view.setTileServer(TileServers.GOOGLE_MAP)
323
+
324
+
marker = map_view.addMarker(map_view.center())
325
+
marker.findChild(MapText).setText("Marker")
326
+
327
+
map_view.resize(1280, 720)
328
+
map_view.show()
329
+
330
+
sys.exit(app.exec())
331
+
```
332
+
306
333
## Using Offline Maps
307
334
308
335
Create a widgets app and download the tiles. This is a one time thing.
0 commit comments