summaryrefslogtreecommitdiff
path: root/examples/location/geojson_viewer/main.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add documentation for GeoJson Viewer exampleMatthias Rauter2023-03-011-2/+50
| | | | | | | | Some code has been changed to make the documentation clearer. Pick-to: 6.5 Change-Id: Icae03a7babc7e40d10cbdca5bfa81d3ab8efbd86 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Add drawing of mapItems to GeoJson viewer exampleMatthias Rauter2023-02-221-4/+26
| | | | | | Pick-to: 6.5 Change-Id: I362acbb6a428e83c3490742824b54aa68890c47f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Use SPDX license identifiersVolker Hilsheimer2023-02-021-50/+3
| | | | | | | Task-number: QTBUG-67283 Pick-to: 6.5 Change-Id: I4b8f877cc355c7c6cd410b3b1683defa58486381 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Get the geojson example working againShawn Rutledge2022-11-151-2/+2
| | | | | | | | | | | | | | | | | | fdbbfa4a6723b816478ee011ab4098e5332dc2f5 removed MapObjectView, but this example continued to depend on it. This reverts parts of commit be7cbed7411d024d178377bd327d5916c80e02a0. Also: - use QtCore.StandardPaths rather than Qt.labs.platform - remove the widgets dependency - use FileDialog.nameFilters to read and write geojson files Let's assume that FileDialog.selectedFile will actually output a QUrl to save the file to, as opposed to a plain path, since the dumpGeoJSON() function is calling toLocalFile() on it. At least that works with native dialogs. Task-number: QTBUG-108455 Change-Id: I1f14c6425115aa95ac2080438ff0c3a24b1b7196 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Android: use string based location permission callsAssam Boudjelthia2022-11-141-1/+3
| | | | | | | | | Amends ef935f6e37a24f52255e6696b85a0fa9aaa7361a. Go back to string based calls until the new permissions API is fully used. Change-Id: If3c1d63ac0267e820fec89dc63cf801022c1f84a Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* GeoJSON: don't crash when operating on empty dataVolker Hilsheimer2022-09-221-1/+4
| | | | | | | | | Fix crashes in "geojson_viewer" example when trying to print or store debug data without loading a file first. Change-Id: I7b2955d072af8d2a1f39bfca196ffc309e9b4234 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
* Don't use deprecated APIs in examplesVolker Hilsheimer2022-09-021-1/+0
| | | | | | | | | AA_EnableHighDpiScaling has no effect, High-DPI scaling is always enabled in Qt 6. Pick-to: 6.2 Change-Id: If96d9fa94b1248ab5bd6b7800e92df82aaec6ac9 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Migrate geojson_viewer example to Qt 6Ivan Solovev2022-07-261-4/+24
| | | | | | | | | | This includes using QuickControls2 instead of QC1 and also refactoring of the code for android permission requests. Task-number: QTBUG-96795 Pick-to: 6.2 Change-Id: I2986d5f1572d5889b15ee6b5d031d51a7b6a3da9 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Use new permission api instead of androidextrasAssam Boudjelthia2021-06-151-22/+5
| | | | | | Change-Id: I64eeb909ef8c034defccebb29f767c69778f501d Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Examples: request permissions storage permissions on AndroidAssam Boudjelthia2020-02-241-0/+23
| | | | | | | | | Since QStandardPaths::writableLocation() is used, it's best to make sure we have to write permissions on Android. Task-number: QTBUG-80717 Change-Id: I992661aed25e7d40254f7c7d6373273cf84aac16 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Improve GeoJson Viewer examplePaolo Angelelli2019-01-251-6/+16
| | | | | | | | Switches to Qt.labs.platform FileDialog and sets the proper initial directory, as well as handles command line argument Change-Id: I2ae4fc3244d1e2566556d3966aedf273ac98e3d1 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Add QGeoJson: a GeoJSON parserJulian Sherollari2019-01-181-0/+263
Add a Class to convert a GeoJSON document to a QVariantList ready to be used as Model in a MapItemView. It comes with autotests, example and detailed documentation. [ChangeLog][QtLocation] Added a GeoJSON parser which can be used to annotate maps with tracks, polygonal boundaries, etc. Fixes: QTBUG-64111 Change-Id: Ib06d3902a052f69f75ae40be5c9ab56023cad916 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>