summaryrefslogtreecommitdiff
path: root/src/location/declarativemaps/qdeclarativepolylinemapitem.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Reorganize code for map items into separate folderVolker Hilsheimer2022-09-231-1975/+0
| | | | | | | | | 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>
* Use QVariant support for converting to a QGeoCoordinateVolker Hilsheimer2022-09-151-1/+0
| | | | | | | | This gets rid of the rest of the locationvaluetypehelper usages, so those files can go completely now. Change-Id: Ieaa543578ef35a8887c04c24352e72ba931badb9 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Change QJSValue properties to QList<QGeoCoordinate/Rectangle>Volker Hilsheimer2022-09-151-7/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QML engine is able to operate on lists of gadgets, there is no need for using private APIs to operate on QJSValue. For the time being, this breaks a QML construct like path[0].longitude = 0 This no longer changes the value of path[0].latitude in place. Instead, use var path0 = path[0] path0.longitude = ... path[0] = path0 This is consistent with other properties that have type list<gadget>, as QML operates on copies of values, not on references. Adapt the test case accordingly. Since support for value-initializing properties of type list<gadget> requires plumbing in the QML engine, and registration of conversion routines from QVariantMap to QGeoCoordinate, augment the test. Remove the now unnecessary toList/fromList conversion functions, and the dependency to private QtQml libraries. Fixes: QTBUG-105241 Change-Id: I8f248c457a6de27a3b2680bdc948c5683ebc7fa0 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Refactor: for loopsVolker Hilsheimer2022-09-141-10/+9
| | | | | | | | | | Replace indexed for loops with ranged for, replace int with qsizetype otherwise as appropriate. Apply const and line breaks in surrounding code. Pick-to: 6.2 Change-Id: I1c2ee372545b8ab2cbb84c4b4b97ae52dedff1d0 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Constructor cleanupVolker Hilsheimer2022-09-121-10/+5
| | | | | | | | Use member initialization, and remove unneeded implementations of special member functions. Fix coding style in related code. Change-Id: I3326e3f331762a9c1ad3c3baac0de02fc5bb2b44 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Port to pointer-to-member-function connection syntaxVolker Hilsheimer2022-08-231-4/+4
| | | | | | | | | | | | | | | | Rename overloads that would cause conflict and require explicit overloa resolution via QOverload: - Q*Reply::error -> errorOccurred (equivalent to QNetworkReply) - Q*Engine::error -> errorOccurred (for consistency, even if no overloa - Q*Manager::error -> errorOccurred (ditto) - QDeclarativeGeoMap::copyrightChanged -> copyrightImageChanged As a drive-by, change QString value parameters to const references. Pick-to: 6.2 Change-Id: I1ab16079842540ca0a86f711d83b35c8c56135e6 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* More include cleanupVolker Hilsheimer2022-07-291-14/+12
| | | | | | | | | | | Remove includes of private headers from other modules where possible. Get rid of some duplicate includes, and try to group includes by module, with private includes in a separate block for better visibility where we have dependencies to private APIs. Pick-to: 6.2 Change-Id: Ia6419bee2a2c50463dcc515f3f1590a749dfabc1 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Use 'const' correctlyVolker Hilsheimer2022-07-281-3/+3
| | | | | | | | | | Don't return or pass const copies, use either plain copies or const references. Make getters const, make variables const, and use qAsConst in ranged for loops to avoid detaches. Pick-to: 6.2 Change-Id: If1463cf7f0077c08dedb15388d912b652c2b037c Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* Reduce includes of private headers from upstream modulesVolker Hilsheimer2022-07-261-1/+0
| | | | | | | | | | | Removing includes that don't seem to be needed for building the code. No effort made yet in reviewing usage of private APIs to see if there are public alternatives. Pick-to: 6.2 Change-Id: I6a41a3488aa6c2bbe6098a0ff6424627ab353686 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* Silence build warnings, fix build errorsVolker Hilsheimer2022-06-161-1/+1
| | | | | | | | | | Replace various deprecated APIs with their supported Qt 6 versions. Most notably, replace QScopedPointer with std::unique_ptr, as the code frequently use deprecated QScopedPointer::swap. Change-Id: If9cb0be89423fd310073709eb390401d74240153 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Port OpenGL dependent code to Qt6 updated graphics APILauri Laanmets2022-02-281-171/+84
| | | | | | | | | | | | All 'old' map object ported to new Qt6 API and tested (almost). Labs project is not tested. This is part of a bigger work to port QtLocation maps to Qt6. Task-number: QTBUG-96795 Change-Id: I0b748a7f4c37f4fcc0cad038e2846b7c86dec84e Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Use up-to date LGPL license headerKai Köhne2021-12-021-11/+14
| | | | | | | | Remove usages of outdated LGPL3 header that references LICENSES.LGPLv3 instead of LICENSES.LGPL3. Change-Id: Ied647fc10d2bf051cccc8b38d75570b7caef1f28 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Change 'geometryChanged' to 'geometryChange'Lauri Laanmets2021-11-091-3/+3
| | | | | | | | | | | | | As stated by the documentation: https://doc.qt.io/qt-6/quick-changes-qt6.html#changes-to-qquickitem This is part of a bigger work to port QtLocation maps to Qt6. Task-number: QTBUG-96795 Change-Id: I9dcf2e454d949dfbf3a9861b98eb949be6e6df56 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
* Change QGeoPolygon 'path' to 'perimeter'Lauri Laanmets2021-11-091-4/+4
| | | | | | | | | | | | https://doc.qt.io/qt-6/qtpositioning-changes-qt6.html#rename-qgeopolygon-path This is part of a bigger work to port QtLocation maps to Qt6. Task-number: QTBUG-96795 Change-Id: I34f27f7e21a3e4243b7fc08a93bc6e95d0541814 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
* QtLocation: adapt to build with external QtPositioningIvan Solovev2021-10-271-23/+4
| | | | | | | | | | This includes fixing some includes to use the full path to QtPositioing/private/header_name_p.h and also fixes related to the reworked clipper wrapper. Task-number: QTBUG-97084 Change-Id: I15ce8d739beb2f190df9f5af01a7cb1642a6b2a2 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Fix compilation for no opengl buildsMichal Klocek2021-03-251-6/+24
| | | | | | | | | | | | | Disables experimental labs qml plugin, which since a4469cad40 depends heavily on opengl backend. Fix warnings with msvc when compiling without experimental plugin. Task-number: QTBUG-91623 Fixes: QTBUG-88017 Change-Id: I53c5da915981bd05f39134ba57f585d0a0786aa8 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Add ; to Q_UNUSEDLars Schmertmann2020-06-291-1/+1
| | | | | | | | This is required to remove the ; from the macro with Qt 6. Task-number: QTBUG-82978 Change-Id: I1aaf36e893b8f947abd0770acd9d3007cffdcb10 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Use QList instead of QVectorJarek Kobus2020-06-251-47/+36
| | | | | | Task-number: QTBUG-84469 Change-Id: Iefd2fb627602ef4744d80858eee72a089ef5f4ec Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Merge remote-tracking branch 'origin/5.14' into 5.15v5.15.0-beta2Qt Forward Merge Bot2020-02-291-1/+1
|\ | | | | | | Change-Id: I66502770edaa22deb2644ce5071df4894c4d0f97
| * Fix return type of doc for qmlmethod MapPolyline.setPathShawn Rutledge2020-02-251-1/+1
| | | | | | | | | | | | | | Fixes: QTBUG-82417 Change-Id: Id9be6f9e248612bce3a17a65d5f73f7ec4c9f45f Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Fix segmentation fault due to null pointer usagePaolo Angelelli2020-02-171-5/+36
| | | | | | | | | | | | Change-Id: I3b030728b32af6e340738583f78b2cfb0d2df11a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Add geometry simplification to MapPolyline/MapPolylineObjectQSGPaolo Angelelli2020-02-121-16/+191
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change introduces a metric-based implementation of the Ramer-Douglas-Peucker line simplification algorithm to generate a LOD pyramid for the polyline geometries. This comes with a related property (in MapItemBase), lodThreshold, that can be used to change the threshold after which no simplification will be used. By default the value of this property is 0, meaning that the behavior will be unchanged and no LOD will be used. This change also introduces LOD on map polyine objects QSG, for which no property is introduced, and there's a default threshold set to zoom level 12 (which appear to produce acceptable results). Finally, this patch makes use of a threadpool with 1 thread to enqueue geometry simplification tasks, which would otherwise freeze the UI when computing for the first time. Support for geometry simplification is currently added only to polylines. It might be of interest extending it to polygons as well, once a proper strategy for handling the simplification of inner holes has been identified. Finally, extending it to circles could be of interest, while potentially bringing only minor benefits, as circle geometries are currently fixed to 128 vertices. Also adds a MapObject-based delegate to the geojson viewer example. Task-number: QTBUG-46652 Task-number: QTBUG-38459 Task-number: QTBUG-49303 Change-Id: I64b5db4577962db17e5388812909285c9356ef0d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | Enable mercator-to-screen projection in GLSLPaolo Angelelli2020-02-111-124/+745
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this change, all the geo-to-screen conversion, and the triangulation operations for geo polylines and geo polygon are performed either at set time or in the shader. A separate bounding box geometry is processed in the old way to provide a correct QtQuick Item geometry, that can be used for nesting mouse areas, performing translations, input event delivery, etc. With this approach, performance are improved by more than one order of magnitude in average, but complex geometries will of course benefit more. It also adds correct rendering support for polygons with holes, previously only rendered correctly by the MapboxGL plugin. The polyline shader has basic miter joins. The miter is skipped if the angle is too sharp to avoid complicating the implementation. This shader introduces some glitches when the polyline is minified, for which the real fix is to have LOD for the geometry, and render simplified geometries at low zoom levels (added in a subsequent patch). Note: this approach, at least in its current implementation, does not support enabling layers on individual items, only on the Map element. Task-number: QTBUG-49303 Task-number: QTBUG-38459 Change-Id: I0c2dc0bf364d32f74ca7c4014f6d66e6219c8ae4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-10-011-1/+1
|\ | | | | | | Change-Id: Id543d32c49c8efd1d7798d41bbee0e28c1742e12
| * Doc: Fix link errors and complete parameter specsNico Vertriest2019-09-301-1/+1
| | | | | | | | | | Change-Id: I786ab35a0e9c8dfa2c8124692289d98e8eee4a8d Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | Add autoFadeIn property to map itemsPaolo Angelelli2019-08-211-0/+11
|/ | | | | | | | | | | | | | This property allows a user to disable the until now built-in behavior that makes map items fade in or fade out between zoom levels 1.5 and 2.5. By default the old behavior is kept. [ChangeLog][Location][MapItems] Added property to disable the automatic fade-in/fade-out behavior on low zoom levels Change-Id: Id764f12d34db528f533f14fd561604507681f216 Fixes: QTBUG-76867 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Doc: Fix documentation issuesTopi Reinio2019-05-161-2/+2
| | | | | | | | | | | Fix various documentation-related issues, including missing parameter documentation, broken links, and typos. Do some minor language editing. Change-Id: I0a8f8457e0d1ab56b4fc4670376509adf1fd26a3 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Fix crash when removing items from MapboxGL mapsPaolo Angelelli2019-01-291-5/+1
| | | | | | | | Triggered by usage of a virtual method in superclass destructor. Change-Id: If99e523e42fd13686ae43c0083a74e1b68221fc7 Fixes: QTBUG-67638 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* QGeoPath/QGeoPolygon: defer bbox computationPaolo Angelelli2018-12-211-12/+4
| | | | | | | | | | | | | | | | | | | | | | | This patch introduces 2 versions of QGeoPath/polygon private: a lazy version (default) and an eager version. The reason is that certain classes such as MapItems make heavy use of the bounding box of the geoshapes, as well as the contains method, and in those cases it's beneficial to have it eagerly computed and cached. Other use cases do not see this feature so much in use, and the added costs, both in terms of computation and in terms of memory requirements for cached data can be avoided. As the patch currently stands, using copy constructors for QGeoPath and QGeoPolygon with a QGeoPathEager and a QGeoPolygonEager (and vice-versa) changes the type of d_ptr. This means that doing, for example, QGeoPath(someQGeoPathEager) effectively returns a QGeoPath that behaves like a QGeoPathEager (although not being one). Change-Id: I8cfed1e0a747139d0fb6d5fb5236bf5f5fbf24c1 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Make tiled renderer and QGeoProjectionWebMercator debuggablePaolo Angelelli2018-11-281-2/+8
| | | | | | | | | | | | | | | This patch introduces a new macro, QT_LOCATION_DEBUG, that, when fed via qmake command line, changes the scope of some members, adds some extra members and some extra data dumping into these members. In this way external code can inspect the state of the renderer in order to debug it. The patch also moves a few classes into separate files, as well as privately exporting them. Change-Id: I32a042863f78dcd10f94b0b7fe8b90f3fc486891 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Fix GeoProjectionWebMercator and MapPolyline incorrect projectionPaolo Angelelli2018-11-191-4/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes rendering artifacts with polylines appearing when rendering large polylines and/or at high zoom levels. Two problems caused the artifacts: 1.A too close near plane when calculating the projectable region in QGeoProjectionWebMercator, which presumably introduced numerical errors when then using such a region to clip data to be projected using a projection transformation based on the same frustum. 2.Projected polylines too large for qTriangulatingStroker, that would then introduce artifacts at screen. To solve 1., as a temporary solution, the distance of the near plane has been increased to a value that seems safe for zoom levels < 19. This while a better formula that scales further is being researched. To solve 2., screen-space line clipping has been brought back from 5.8, and added on top of mercator-space clipping. This, in theory, should also increase the performance, allowing qTriangulatingStroker to process less data. Task-number: QTBUG-71607 Change-Id: Id774419dde819931e2fdd78b02081695a91302ef Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Make QDeclarativeGeoMapItemBase::geoShape R/WPaolo Angelelli2018-08-141-0/+16
| | | | | | | | This patch adds a setter for the geoShape property, overridden in the subclasses. Change-Id: I5fc4d412efee5e95c5650943ea5bf9b72dc40155 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Fix MapPolyline docPaolo Angelelli2018-05-091-5/+0
| | | | | | | | GL_LINES aren't used anymore. Remove the related note. Task-number: QTBUG-63223 Change-Id: Ic309b3ad4626506151b20f69e5f11a3f1d7cc888 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Merge remote-tracking branch 'origin/5.11.0' into 5.11Paolo Angelelli2018-05-041-11/+58
|\ | | | | | | Change-Id: I0bb00d16c891856cfbe1042ce166bbd156e9f41b
| * Fix QGeoMapObject handling in reference implementationPaolo Angelelli2018-04-221-11/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | setVisible was neither changing the visibility nor triggering repaint. Pimpls weren't removing themselves in their destructors when dynamically added/removed via QGeoMapObjectView add/removeMapObject. This patch also factors out the duplicated QGeoMapObject support from QGeoTiledMapLabs and QGeoMapObjectsOverlay and moves it into an own class, QGeoMapObjectQSGSupport. To properly flush the scene graph nodes upon object removal, a pointer to the QSGNode is added to the MapObject struct, now moved inside QGeoMapObjectQSGSupport. Change-Id: Ie8c6d54f8f340ba3867717d9620791d3fe8021cc Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Remove unused variablePaolo Angelelli2018-04-251-1/+0
|/ | | | | | | | This fixes error: unused variable 'kClipperScaleFactorInv' in dev on macOS. Change-Id: I37dda7aca1c20797b2aede291a425fd327670655 Reviewed-by: Liang Qi <liang.qi@qt.io>
* Remove dead code in QGeoMapPolylineGeometry::updateScreenPointsPaolo Angelelli2018-04-191-8/+2
| | | | | | | | QTriangulatingStroker does apparently not use the clip argument, so the patch removes the code that calculates it. Change-Id: I14eeb2e7aac38e3f066d4d33c68ceae63555944d Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Add QGeoMapPolylineGeometry::containsPaolo Angelelli2018-04-191-12/+19
| | | | | | | | | | | | This patch makes QGeoMapItemGeometry::contains virtual, and overrides it in QGeoMapPolylineGeometry, so that it can be used in items that have QGeoMapPolylineGeometry for borders. This patch fixes the issue of map polygons not being interactive on their borders. Task-number: QTBUG-67765 Change-Id: I7c571e57b9f1d26203f3e5857d47e85380281b28 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Fix MapPolyline being drawn misplaced and moving when clippedPaolo Angelelli2018-04-191-3/+5
| | | | | | | Regression introduced in f0bc0db15ed262a8f31bb07b3b46a5cdf9277e79 Change-Id: I4c4a3cb2302daeb825be21f9e2f6c235d2cb7c93 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Merge remote-tracking branch 'origin/wip/navigation' into 5.11Paolo Angelelli2018-04-171-0/+6
|\ | | | | | | | | | | | | | | | | Conflicts: src/location/declarativemaps/qgeomapobject.cpp src/location/declarativemaps/qgeomapobject_p_p.h src/plugins/geoservices/itemsoverlay/qgeomapitemsoverlay.h Change-Id: Iab847e16011b2095d307e2a3610bf9157ae7b92d
| * Introduce map objects reference implementationPaolo Angelelli2018-04-171-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces a reference implementation for the QGeoMapObject subclasses in the locationlabs module. If this module is built, all current plugins, with the exception of mapboxgl, will also be able to render map objects. The current reference implementation of map objects is not optimized, but it can be useful for both testing and feature parity (so that switching between plugins will give the same result). Change-Id: I830ebb3813f219e42c085f450952a2b4327361cd Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Fix Clipper screwing polyline topology during clippingPaolo Angelelli2018-04-111-6/+182
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This fix uses a different polyline clipping algorithm to do line-polygon clipping which uses Clipper internally only to do inside/outside testing. Among other things, this method appears to be much faster than the older one. Task-number: QTBUG-66692 Task-number: QTBUG-66830 Change-Id: I2ed6f46c5d9d426a740611bec13aff69be49eb2a Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Doc: Fix all documentation warningsTopi Reinio2018-03-271-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix multiple warnings caused by invalid documentation configuration, missing QML module specifiers, wrong QML type names, incorrect arguments for the \fn command, and missing documentation. Remove incorrect statement from the example usage of the Waypoint QML type. Use 'QtLocation' as the name for the module throughout the docs. Clang (used as the parser for QDoc in Qt 5.11) was unable to resolve the path for qlocation.h, causing QDoc to omit the QLocation namespace documentation. Fix this by including the file explicitly from qlocationglobal.h for documentation builds. Change-Id: I2bd790db1ff5ad96f0cdb415a682b97593b3a6dc Reviewed-by: Martin Smith <martin.smith@qt.io>
* | Fix MapPolyline QQuickItem geometry to allow enabling layersPaolo Angelelli2018-03-221-3/+3
|/ | | | | | | | | The geometry now considers the line width, so that, when enabling layers, the item won't be incorrectly clipped at the borders. Task-number: QTBUG-38459 Change-Id: I82c1e49c914a4a1219bb1f1ec3a70ff7bfbfbcfe Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Fix re-set map items rendering stale geometryPaolo Angelelli2018-03-011-2/+7
| | | | | | | | Geometries are now cleared if data is invalid, before early return. Task-number: QTBUG-66758 Change-Id: Ie89248f78b5fd817a33ed5d6ff56b3547d64a50b Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Allow plugins to use alternative map projectionsPaolo Angelelli2018-01-271-12/+16
| | | | | | | | | | | | | | | | | | | | | | | | QtLocation mapping has always been geared around the WebMercator projection. Some mapping SDKs support additional projections, such as General Perspective (often called globe view or globe rendering). The goal of this patch is to allow a plugin to provide such a view, disabling WebMercator specific features, and redirecting API calls to plugin-specific implementations. In particular, this patch disables the rendering of Map Items (QDeclarativeGeoMapItemBase and sons) for projections different from WebMercator, with the exception of MapQuickItems. MapQuickItems, in turn, lose the ability to draw "on the map", when the projection is different from WebMercator. However, they can still be used to add geolocated popups, buttons and other UI elements. fitViewportToMapItems is also disabled, for both it can't be computed and there wouldn't be any item to fit (with the exception of mapquickitems) Change-Id: I9fa2fdd01a35a078fc4663efc9d269c4ecaa3f41 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Move QML/Cpp list conversions into locationvaluetypehelperPaolo Angelelli2018-01-221-29/+2
| | | | | Change-Id: Iee7f48f7d24b40a2824775654030397617c40640 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Merge remote-tracking branch 'origin/5.9' into devPaolo Angelelli2017-08-101-114/+1
|\ | | | | | | | | | | | | Conflicts: tests/auto/declarative_ui/tst_map.qml Change-Id: If408b8242b39f78926b5373393f3b1f65b262499
| * Fix dragging items out of map boundsPaolo Angelelli2017-07-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 5.9.0 map items are clipped against the visible region. This implies that their geometry is also clipped against the visible region. This is problematic in ::geometryChanged, since the old geometry is always clipped in this way. This patch clips items against a "projectable" region instead, that is the part of the map that is in front of the camera. Since this can produce very large vertices, mapbox earcut 3rd party library is pulled in, to replace qTriangulate that only supports coordinates up to 1<<21. This patch also contains a fix for earcut.hpp to make it build also on QNX6.6 Task-number: QTBUG-61727 Change-Id: Iffc95fdae88fef982c1eb86db567b326b5e51057 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
| * Revert "Fix dragging items out of map bounds"Paolo Angelelli2017-07-191-1/+1
| | | | | | | | | | | | | | | | This reverts commit 2ab93acd9751b3ffe2c36a4a0e37dc792686a08f. Reason being: not passing QNX6 bot Change-Id: If45fe095b6e6959f7c40e3e0ed7a14d278bbb230 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>