summaryrefslogtreecommitdiff
path: root/src/location/quickmapitems/qdeclarativegeomapitembase.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Polygons/lines can now be rendered following the shortest path on the globeMatthias Rauter2023-04-111-0/+14
| | | | | | | | | | | | | | | | | | | | | | This is enabled by interpolating the lines of polygons and paths. The interpolating is done following the greater circle navigation and the connection between corners of the polygon appear curved on the projected map. This behavior can be turned on by setting a new property, called referenceSurface. It can be set to ReferenceSurface.Map, drawing paths as lines on the map or to ReferenceSurface.Globe, drawing path on the globe leading to curves on the map. It is set to ReferenceSurface.Map on default, reproducing the old implementation for polygons, polylines and rectangles. The circle item was already using the great circle path before this change. Its standard implementation was changed to draw a circle in map coordinates with approximated radius. This should be sufficient for many cases. To get the old implementation, referenceSurface has to be set to ReferenceSurface.Map. Fixes: QTBUG-94785 Change-Id: Ifdd1597a7116c3d220462f063656b04becb6422f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Correct and improve the rendering of QuickMapItemsMatthias Rauter2023-02-141-5/+3
| | | | | | | | | | | | | | | | | | | | | | | Various MapItems were not rendered correctly, especially in corner cases. This change ensures that MapItems are rendered correctly in the vast majority of cases. All MapItems are shown correctly if they wrap around the globe and appear twice on the map. Circles that span around the globe or are located near poles are shown correclty and filled all the way to the border of the map. Polygons are shown correctly including their holes. The code was simplified and some artefacts of previous implementations were removed. Fixes: QTBUG-110701 Fixes: QTBUG-110511 Pick-to: 6.5 Change-Id: I1110659989436cd5a93f6ec26f75caa06d5f2b71 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Implement all four map items with ShapeLaszlo Agocs2023-02-081-1/+21
| | | | | | | | | | | | | With a master switch in qdeclarativegeomapitembase_p.h, this is enabled by default. For now the old method is still available by just commenting out the define. The old path can be removed in follow-up patches; for now keeping both so one can compare and debug if further issues arise. Pick-to: 6.5 Change-Id: I01c44ee8a07d7d5f7eb018be33ac5d161ba90e2a Reviewed-by: Matthias Rauter <matthias.rauter@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Use SPDX license identifiersVolker Hilsheimer2023-02-021-38/+2
| | | | | | | Task-number: QTBUG-67283 Pick-to: 6.5 Change-Id: I4b8f877cc355c7c6cd410b3b1683defa58486381 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Remove all C++ event handling, prep for pointer handlersShawn Rutledge2023-01-281-19/+0
| | | | | | | | | | | | | The QML Map type is now non-interactive. The plan is to replace QQuickGeoMapGestureArea with a set of pointer handlers on top of Map, probably in a new QML type called MapView. [ChangeLog][Map] Map is now non-interactive, concerned only with rendering. Pick-to: 6.5 Task-number: QTBUG-68108 Change-Id: Ie64ffd13abc2b3e00d8e90043f3bb672299f4f15 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Build system: move to declarative type registrationVolker Hilsheimer2022-09-281-5/+0
| | | | | | | | | | | | | | | | | | | | Adjust the build system accordingly, attaching a QML module with the respective implementations to the QtLocation target. An explicit function is still needed to register converters, and will be removed once the improved support for value types has merged. This should enable the qml compiler to generate C++ code, which then requires linking against the library. The MapParameter type was renamed to DynamicMapParamter as per the 5.11 change log, so remove the MapParameter alias now and adjust tests. Task-number: QTBUG-106886 Change-Id: Id8765c1bc3b98d447d768b246b21a16f71bfdf74 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Reorganize code for map items into separate folderVolker Hilsheimer2022-09-231-0/+337
Splitting the code that only provides declarative wrappers around types from the implementations of the map and item rendering makes it easier to work with the code base and identify dependencies. Change-Id: I00064f928043dfa77f22e68b1efe54f414cb62f7 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>