summaryrefslogtreecommitdiff
path: root/src/plugins/geoservices/mapboxgl/qmapboxglstylechange.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Mark the module as free of qAsConst()Marc Mutz2022-12-071-2/+2
| | | | | Change-Id: Ie67ec9b4f1f808b3b70ca7beb98f90c9cd1f2a9f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Remove parameterization functionalityVolker Hilsheimer2022-11-021-219/+0
| | | | | | | | | | | | | | | | | | | | | The abstraction of plugin-specific parameters makes little sense if we don't want to provide a cross-backend API. So remove this for now. If in the future we want to attach meta-data or backend-specific properties to values or element types, then we might be able to use existing QVariantMap type properties (like QGeoRouteRequest's extraParameters, via QDeclarativeGeoRouteQuery::extraParameters), or register backend specific QML types that applications can opt in to use. This requires a bit of research and experimenting based on specific use cases. If we can't come up with anything better, then bringing back a, perhaps simplified, version of the infrastructure removed here will still be an option. Change-Id: If590a35f2ffb80b0c918d866e88913a9caf75d2b Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Clean up: move code into right place, remove dead codeVolker Hilsheimer2022-10-061-1/+1
| | | | | | | | | | | QGeoMapItemGeometry::geoDistanceToScreenWidth was unused, so remove it. Move path/pathMercator projection helpers to QGeoMapItemGeometry, they are used in items other than the rectangle items. In mapbox plugin, call static helper from correct class. Change-Id: I5645f503a24e23e295211da32e98f995b8c17b56 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 QGeoPolygon 'path' to 'perimeter'Lauri Laanmets2021-11-091-1/+1
| | | | | | | | | | | | 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>
* Allow removal of layers and sources created using parameters in MapboxGLTadej Novak2021-03-251-0/+29
| | | | | | | | [ChangeLog][MapboxGL] Sources and layers from parameters can be removed Task-number: QTBUG-91623 Change-Id: I08db3e02b123f3ffb16e09fb77070ad5b6dbb18a Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Enable mercator-to-screen projection in GLSLPaolo Angelelli2020-02-111-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Add image source support to Mapbox GL pluginTadej Novak2019-11-091-1/+5
| | | | | | | [ChangeLog][QtLocation][MapboxGL] Added support for image sources Change-Id: I5334f36e033d26824300d90ad8d9aacf3ac75ac3 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Honor QGeoPolygon holes in the MapboxGL pluginPaolo Angelelli2018-08-221-9/+21
| | | | | | | | This since mapbox-gl-native is able to properly render these holes. Change-Id: I29ee9efd256c607ad36543a949b64699de310371 Reviewed-by: Bruno de Oliveira Abinader <brunoabinader@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Introduce Map.visibleAreaPaolo Angelelli2018-07-261-40/+1
| | | | | | | | | | This will allow moving the visible map area to a subregion of the viewport, allowing to maintain the desired visible region visible when overlaying controls on top of the map. Task-number: QTBUG-68966 Change-Id: Idf4b30f7c1e4062e5e1c0ddc01a31bc856c0bc0c Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Support dynamic properties in QMapboxGLStyleChangeBruno de Oliveira Abinader2018-06-061-24/+32
| | | | | | | | | | | | QMapboxGLStyleChange should iterate also over dynamic properties when generating the style change objects. These dynamic properties could come from generic QGeoMapParameter objects instantiated from C++ code. Task-number: QTBUG-68598 Change-Id: I01a3e0971615c61f74789446c03255185a373803 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Support raster-dem source type in Mapbox GL Map QML pluginBruno de Oliveira Abinader2018-05-161-2/+3
| | | | | | | Task-number: QTBUG-68121 Change-Id: Ica6bbd875777aa5689a683127937c594f4ff05f8 Reviewed-by: Thiago Marcos P. Santos <tmpsantos@gmail.com> Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Merge remote-tracking branch 'origin/wip/navigation' into 5.11Paolo Angelelli2018-04-171-1/+1
|\ | | | | | | | | | | | | | | | | 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-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | mapboxgl: Specify map margins in pixels via 'margins' map parameterBruno de Oliveira Abinader2018-04-091-1/+40
|/ | | | | Change-Id: Ifa95aea264dc1807b90d7619a0946bf291df16ce Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Allow plugins to use alternative map projectionsPaolo Angelelli2018-01-271-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* Consider map item color alpha channel when applying opacityBruno de Oliveira Abinader2017-10-261-4/+4
| | | | | | Task-number: QTBUG-63928 Change-Id: I8b09da92e182dc5464516842718b8d30bc9a48fc Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Check if coordinates are non-empty before repeating the first entryBruno de Oliveira Abinader2017-10-261-1/+4
| | | | | | Task-number: QTBUG-63926 Change-Id: Ic57090dbc78705893280e040e5b4556cf296f949 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Fix Mapbox GL plugin not respecting MapItem visibility and opacityThiago Marcos P. Santos2017-09-051-3/+10
| | | | | | | | Now opacity and visibility will be respected for the fill color as borders are not supported yet. Change-Id: I58f982dc9285537fde770e14238c5d6d903913e6 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Mapbox GL native circle supportBruno de Oliveira Abinader2017-08-301-0/+48
| | | | | | | | | | Circles crossing one pole are drawn inverted. Circles crossing 2 poles do not even have the correct geometry. Nevertheless, a first approximation. Task-number: QTBUG-58869 Change-Id: I5a508f5d6e27c4f08412a7ae327883866068a1e9 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Bump Mapbox GL to v1.1.0Thiago Marcos P. Santos2017-08-221-10/+24
| | | | | | | | mapbox-gl-native @ bd15e273dce767458d335aeb1f50aa081390d593 Task-number: QTBUG-62454 Change-Id: I241ae47d8590a5de7da95f39ae056abeab9c172b Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Use QDeclarativeGeoMapItemBase objectName to create mapboxgl item idPaolo Angelelli2017-06-181-1/+2
| | | | | | | | | | With this patch is now possible to predict what's the layer name that the mapboxgl plugin is generating for a specific map item, if that item has the objectName set. Change-Id: I7726e44c6b0cc981d30e7725326075025f49af30 Reviewed-by: Thiago Marcos P. Santos <tmpsantos@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Make it possible to MapItems to rendered under some style layersThiago Marcos P. Santos2017-05-251-4/+8
| | | | | | | | | Add a MapParamter to specify the default "before" layer for MapItems that Mapbox GL can render. This can be used for inserting route lines before labels. Change-Id: I3ee414ee8af31f38b74c95b3ecc31df6085bed30 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Fix line rendering when ending and joiningBruno de Oliveira Abinader2017-03-061-0/+31
| | | | | | Change-Id: I30e1ae3ec70e8ab36ef3344cecb7a66b1d37a952 Reviewed-by: Thiago Marcos P. Santos <tmpsantos@gmail.com> Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Unwrap longitude in Mapbox GL when neededBruno de Oliveira Abinader2017-03-021-3/+24
| | | | | | | This is in order to keep parity with Qt visual expectations. Change-Id: Iea758483972e53b8f42e352401390d95dd1c1407 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Fix support for MapParameters on Mapbox GL pluginThiago Marcos P. Santos2017-02-171-0/+501
Mapbox GL plugin can now accept MapParameters, such as MapParameters used for the Mapbox runtime style API, allowing runtime changes on the map, not restricted only to style, but also adding new geometries and features. Change-Id: If0394bd044a2d3058fe5480966880a1055614ea2 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>