summaryrefslogtreecommitdiff
path: root/src/plugins/geoservices/mapbox/qgeotiledmappingmanagerenginemapbox.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-1/+1
| | | | | Change-Id: Ie67ec9b4f1f808b3b70ca7beb98f90c9cd1f2a9f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Remove MapObjects from labsVolker Hilsheimer2022-09-261-5/+0
| | | | | | | | | | | | | | | The feature was designed to enable map backends to implement their own rendering of the map, and map items. It was never really used by any of the backends we supported, and introduced a lot of complexity to the code base. The idea as such has perhaps merit, but for now we focus on the basic functionality of Qt Location. Support for Qt Location when the Qt Quick scene graph is not used is not a part of that. Change-Id: I08e460043a0bd2600bad79b6ce2bb18e40e19eb6 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Refactor: for loopsVolker Hilsheimer2022-09-141-2/+2
| | | | | | | | | | 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>
* 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>
* Use QList instead of QVectorJarek Kobus2020-06-251-1/+1
| | | | | | Task-number: QTBUG-84469 Change-Id: Iefd2fb627602ef4744d80858eee72a089ef5f4ec Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix warning about QString::SkipEmptyParts being deprecatedThiago Macieira2020-05-061-1/+1
| | | | | | | | /home/tjmaciei/src/qt/qt5/qtlocation/src/plugins/geoservices/mapbox/qplacesearchreplymapbox.cpp:107:98: warning: ‘QString::SkipEmptyParts’ is deprecated [-Wdeprecated-declarations] Pick-To: 5.15 Change-Id: Ib3333a58f37746f3b935fffd1607e152af50f386 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Introduce map objects reference implementationPaolo Angelelli2018-04-171-1/+7
| | | | | | | | | | | | | | | | 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>
* Add camera capabilities + metadata to QGeoMapType/QDeclarativeGeoMapTypePaolo Angelelli2017-07-311-17/+17
| | | | | | | | | | | | | | This patch enriches QGeoMapType/QDeclarativeGeoMapType embedding into this object the camera capabilities for this type, that are then exposed via a new QML Type, CameraCapabilities, and custom metadata in form of a QVariantMap, that can be accessed via the new metadata property. [ChangeLog][QtLocation][QDeclarativeGeoMapType] Added CameraCapabilities and metadata properties to QDeclarativeGeoMapType. Task-number: QTBUG-58931 Change-Id: I97a8852fbb3bbac88fdbf0d47e8247ea7ed1f31e Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Fix Mapbox plugin mixing tiles for specified map_idsPaolo Angelelli2017-06-191-17/+17
| | | | | | | | | | | | | | This patch fixes the handling of map_ids, preventing the plugin from picking the wrong ids when reading or writing tiles. This changes also makes the generation of map types consistent with the other plugin, with the first type having mapId of 1. Change-Id: I1562a2bbccacf11958ee22a60e9eee74faa15a2e Reviewed-by: Thiago Marcos P. Santos <tmpsantos@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Add pluginName to QGeoMapType and check against it in setActiveMapTypePaolo Angelelli2017-05-071-18/+19
| | | | | | | | | | | This patch adds a QByteArray member to QGeoMapType with the name of the plugin providing that map type. This value is then used to validate what is passed to QDeclarativeGeoMap::setActiveMapType to see if it's a map type for the currently set plugin. Change-Id: If15b67c32150f0c3c2815d28e26fc37138d4cf71 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Allow overzooming when setting zoomLevel directly in a MapPaolo Angelelli2017-04-121-0/+1
| | | | | | | | | | | | | This patch moves the lower/upper bound check on setZoom from QDeclarativeGeoMap to the gesture area, allowing to set higher zoom levels than the maximumZoomLevel when setting Map.zoomLevel directly, for the map types that support overzoom. This is now safe as the bound check is introduced in the tile fetcher, so no invalid tiles will be requested, and is beneficial when combining layers supporting different maximum zoom levels. Change-Id: I08ee9c282ee2ebc1dafa3c68a238b93ffbc1ba02 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Add parameter to control prefetching in tile-based geoservice pluginsPaolo Angelelli2017-03-271-1/+13
| | | | | Change-Id: I18fc1788f7af0efe76f97257ffe739eb1a96e6cc Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Add rotation/tilting support to QGeoTiledMapScene/QGeoCameraTilesPaolo Angelelli2017-01-261-0/+6
| | | | | | | | | | | | This patch adds rotation and tilting support to QGeoTiledMapScene and QGeoCameraTiles. It also adds the related capabilities to the geoservice plugins mapping managers QML Api is added in a separate patch Change-Id: I3de1b52a9928c4856f6ee57ad39191acebe0f770 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Improve support for unitary tile cost in QGeoFileTileCachePaolo Angelelli2016-11-231-13/+38
| | | | | | | | | | | | | | | This patch adds support for separate caching mode for each of the three caches, disk, memory and texture. It also adds separate plugin parameters to the mapbox plugin to control the functioning of each of these cache. By default it only sets the disk cache to unitary, to comply with mapbox TOS, and leaves the other two caches to bytesize behavior (old beavior). Change-Id: I665d40568f4e69a836d7489e1daa2d8dcb8987af Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Add support for unitary tile cost in QGeoFileTileCachePaolo Angelelli2016-11-221-10/+18
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for unitary pricing of tiles in the disk, memory and texture caches. This is done through a new enum in QAbstractGeoTileCache, "CostStrategy" having two values, Unitary (new one) and ByteSize (the old way). Using Unitary instead of ByteSize gives, as advantages: - the ability to comply with the TOS of certain providers, who allow to cache a fixed number of tiles, and not of bytes. - even performance with different types of tiles, like lo vs hi res, indexed vs satellite (which usually compresses much less). This patch sets the Unitary mode to be the default for the mapbox plugin since Mapbox is one of the providers whose TOS limit the amount of cacheable tiles. Therefore, the patch also modifies the mapbox plugin ".mapping.cache" parameters to reflect the new behavior. Since these parameters have been introduced with 5.8 (which is unreleased), the change doesn't need to be backward compatible. Change-Id: I76edd43900242885f24eb9f28e8c833538647edc Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Fix for incorrect plugin parameter handling in mapbox pluginPaolo Angelelli2016-10-071-1/+1
| | | | | | | | This patch fixes the incorrect handling of the mapbox.mapping.highdpi_tiles parameter Change-Id: I35fb5ae09dc640693c7f0d80534ad7042ca83e27 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Making mapbox plugin parameter names more consistentPaolo Angelelli2016-09-261-13/+19
| | | | | | | | | | This patch changes some of the parameter names for the mapbox plugin, making the naming more consistent. The new naming starts with "mapbox.mapping." for parameters related to mapping. Change-Id: I2f185733521dfd2fb0fb7cd0b9aa08ca026b7537 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Set lowDPI tiles to be the defaultPaolo Angelelli2016-08-261-3/+3
| | | | | | | | | | | Since HighDPI tiles are currently causing severe performance penalties on mobile devices (at least iOS devices), this patch sets the default mode to highdpi = false. Change-Id: I2f99e3955ecccd905e8962d005421d1b5276ea84 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Michal Klocek <michal.klocek@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* MapBox: Add Linguist commentsFriedemann Kleint2016-08-221-0/+14
| | | | | | | Add some comments helping translators to find the right wording. Change-Id: Ie77f1020897b196668c03f472905bb47c6929d45 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Version tile cache with qt version and evict obsolete data on init()Paolo Angelelli2016-08-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This patch changes the base cache directory to a new scheme containing the qt version. At the time of commit, this would be "QtLocation/5.8/tiles/" This versioning does not have to change at every release, but when there are changes in the caching scheme. The reason for this is that, otherwise, it becomes difficult to clean up old cache data. QGeoFileTileCache::init already clean up old tile cache from 5.4 or older, where the cache data wasn't organized under a directory for each plugin. In 5.8 different naming scheme are introduced for mapbox tiles (with @1x,@2x) , here maps (with ppi), and soon for OSM too (with an identifier for the actual provider, not only the mapId). With this patch it will become easier and cleaner to upgrade the cache data without leaving residues. Change-Id: I89aeac0aaf1408d119cde5792fc69a64d5d89c3a Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Fix for mapbox plugin legacy parameter supportPaolo Angelelli2016-07-201-42/+20
| | | | | | | | This patch restores the support for the legacy plugin parameter "mapbox.map_id" Change-Id: I97ccc5d1a73cd2746352b6a309dece4c3440dfff Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Differentiate cached tiles by dpiPaolo Angelelli2016-07-191-4/+5
| | | | | | | | | | | | | This patch uses separate filenames for tiles downloaded at different resolutions/dpi. For the HERE plugin, the dpi is appeneded to the filename. For the mapbox plugin, @1x or @2x is used due to the different approach to High DPI tiles. Change-Id: I0dcda088dae84e98c0e73bdc24435d7e2a3f43f7 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* fix for not working mapIds for mapbox pluginPaolo Angelelli2016-07-061-0/+1
| | | | | | | fix for not working mapIds for mapbox plugin Change-Id: Iebde6ad640c1b49296e3bd528c942f7abc98d5b6 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Use HiDpi tiles to produce crisper maps at fractional zoom levelsPaolo Angelelli2016-07-011-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current QtLocation renderer uses geotiles of specified size for each specific zoom level, and show them using nearest neighbor interpolation when the camera is at that specific zoom level. Interpolation is changed to linear when the zoom level is in between two neighboring tile layers, but hasn't reached the next yet, so that the previous layer can be magnified smoothly. While this is the correct approach, it produces blurry images most of the time, while the previous camera mechanics, not allowing continuous zoom, was able to show crisp images all the time. To retain the continuous zoom and produce crisp images, this patch makes use of HiDpi tiles from providers that offer them (HERE and mapbox). The way these two providers offer HiDpi is different: HERE scales the map elements (text, mostly), to address a specific dpi (supported dpis are 72, the standard, 250, 320, 500), while mapbox returns the same tile at double resolution. The way the patch deals with this is by taking the image requested as is, but setting the tile size in the renderer to be half of that, while at the same time enabling mip mapping for QSGImageNodes. In this way, at integer zoom level, texture LOD 1 is shown, that is an OpenGL-scaled-down version of the downloaded tile, while at the other fractional zoom levels trilinear interpolation is used to produce a good image. This approach was not possible for the openstreetmap geoservice provider because mapquest (the currently used data provider) does not offer HiDpi tiles, and a scaled version of the standard tile would make the text unreadable half of the times. Further scaling would be possible, e.g., with HERE maps, offering 500ppi maps, to look good during scaling also on HiDpi devices. This can be addressed in a future patch. Task-number: QTBUG-53318 Task-number: QTBUG-48868 Task-number: QTBUG-36949 Change-Id: Iaa6f5b1ece9d37a0c85e73efaf1bd3b50b1d5950 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Improve Mapbox geoservice pluginPaolo Angelelli2016-06-301-5/+108
| | | | | | | | | | | | | | | This patch adds standard mapbox map modes so that they could be used out of the box without the need for specifying it as parameter, and also adds a QGeoFileTileCache to the plugin, since the Mapbox TOS allow a limited caching even in the free plan. The default cache max disk usage has been set accordingly. The mapbox.map_id parameter is now optional, meaning that things will work like before if present, but will work with the default mapbox styles if not. Change-Id: I4056a3706f47d7f5c46a873c135b743106647fc0 Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com> Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com>
* Set shorter name for class names with 'MapData'Michal Klocek2015-05-041-3/+3
| | | | | | | | Rename all references and files with 'MapData' to use shorter name 'Map'. Change-Id: I8ab790146ee28e540e6866ba0218eea61bae6e64 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Remove QGeoMapData class.Michal Klocek2015-05-041-1/+1
| | | | | | | | | Since QGeoMap class does not have any subclasses, there is no need for keeping the bridge in form of QGeoMapData. This commit basically renames QGeoMapData to be QGeoMap. Change-Id: I6eb2f56f7ea83663034f4a8297e8e8f7f185d6a9 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Remove LGPLv2.1 and add GPLv2+ from/to QtLocationAlex Blasche2015-02-191-13/+16
| | | | | | Change-Id: I3007aa04d3dbc0e00cb0a43987d64d01ddf91edd Reviewed-by: Lorn Potter <lorn.potter@gmail.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
* Update contact URL in all license headers to qt.ioAlex Blasche2015-02-181-1/+1
| | | | | Change-Id: Ia1e333be7fec8898de609d9b9303b1ad7687632e Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
* Add Mapbox plugin.Robert Ancell2015-01-091-0/+90
Allow Mapbox (https://www.mapbox.com) maps to be used. This requires the user to set the mapbox.map_id and mapbox.access_token parameters for the Map object. Change-Id: I3095df260dd0c9d49d84d45385c5a530fcffee0b Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>