Add GeoJson QML API and refactor GeoJson Viewer example
The GeoJson Viewer example used private C++ functions to open and save
GeoJson files. QtLocation is not intended to have a public C++ API and
it is therefore required to create a QML API to make these functions
available to our users.
This patch moves some code of the example, responsible for exposing the
C++ GeoJson functions to QML, into the QtLocation source code. The new
type GeoJsonData can be used to load and save GeoJson files into a
model, which can then be rendered using delegates.
Change-Id: Icce78f48d77f303faa96ac065ad96025eded83e7
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| commit | 537147dc78272016398cc3c43f91ff88356f8f65 |
| parent | 76d6a7dea244944a1366c20e058f468e5eb4e7b9 |
| author | Matthias Rauter <matthias.rauter@qt.io> |
| committer | Matthias Rauter <matthias.rauter@qt.io> |
| commit time | Sat, 19 Aug 2023 09:14:52 +0200 |
- M examples/location/geojson_viewer/CMakeLists.txt
- M examples/location/geojson_viewer/GeoJsonDelegate.qml
- M examples/location/geojson_viewer/doc/src/geojson_viewer.qdoc
- M examples/location/geojson_viewer/geojson_viewer.pro
- M examples/location/geojson_viewer/main.cpp
- M examples/location/geojson_viewer/main.qml
- M examples/location/geojson_viewer/qml.qrc
- M src/location/CMakeLists.txt
- A src/location/declarativemaps/qdeclarativegeojsondata.cpp
- A src/location/declarativemaps/qdeclarativegeojsondata_p.h
- M src/location/maps/qgeojson.cpp