summaryrefslogtreecommitdiff
path: root/src/location/maps/qgeocameratiles.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-4/+4
| | | | | Change-Id: Ie67ec9b4f1f808b3b70ca7beb98f90c9cd1f2a9f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Refactor: for loopsVolker Hilsheimer2022-09-141-53/+43
| | | | | | | | | | 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>
* Cleanup private map typesVolker Hilsheimer2022-08-191-12/+0
| | | | | | | | | | | | | | Use member initialization and remove any explicit implementation of the special member functions if they are just the default. Remove some unnecessary Q_DISABLE_COPY that prevents compiler-generated versions of the special member functions. Task-number: QTBUG-105206 Pick-to: 6.2 Change-Id: I206abd07acbbcb863a4d8099a5d8b7ff1f641079 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* More include cleanupVolker Hilsheimer2022-07-291-4/+6
| | | | | | | | | | | 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-6/+4
| | | | | | | | | | 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>
* Silence build warnings, fix build errorsVolker Hilsheimer2022-06-161-2/+2
| | | | | | | | | | 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>
* 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-8/+6
| | | | | | Task-number: QTBUG-84469 Change-Id: Iefd2fb627602ef4744d80858eee72a089ef5f4ec Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Make tiled renderer and QGeoProjectionWebMercator debuggablePaolo Angelelli2018-11-281-71/+19
| | | | | | | | | | | | | | | 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>
* Introduce Map.visibleAreaPaolo Angelelli2018-07-261-9/+36
| | | | | | | | | | 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>
* Fix for projection mismatch when aspect ratio < 1.0Paolo Angelelli2017-03-221-12/+5
| | | | | | | | | | | This patch fixes an incorrect computation of the projection matrices and thus a mismatch in projections between mbgl vs the other plugins when the window A/R is less than 1.0. Task-number: QTBUG-59417 Change-Id: Ib03eaa4c877a00c9281c335f859c854d6db632c0 Reviewed-by: Bruno de Oliveira Abinader <brunoabinader@gmail.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Fix frustum footprint calculation in QGeoCameraTilesPaolo Angelelli2017-02-281-148/+30
| | | | | | | | | | | | | The old algorithm for computing the frustum footprint has problems with certain viewport sizes when tilting the map. This patch fixes the problem, and also removes the dependency on a local copy of qsort that was necessary in order for that algorithm to work properly. Task-number: QTBUG-58684 Task-number: QTBUG-34088 Change-Id: I36aaaa90c567cd19a4ae66dba8def0aec0b00534 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Add rotation/tilting support to QGeoTiledMapScene/QGeoCameraTilesPaolo Angelelli2017-01-261-56/+132
| | | | | | | | | | | | 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>
* Rename QGeoProjection to QWebMercatorPaolo Angelelli2017-01-161-2/+2
| | | | | | | | | | QGeoProjection is currently a class containing only static methods for WebMercator conversion/interpolation. This patch renames it to QWebMercator, effectively freeing the QGeoProjection name for a real projection class Change-Id: I15b71d04f7d1d21a1d26f46687ed33aa277f6deb Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Fix cache mixing with high-dpi and low-dpi osm providersPaolo Angelelli2016-10-051-0/+5
| | | | | | | | | | | | | | | | | This cache fixes the cache mixing problem that has been introduced with the osm high dpi tiles support. high dpi providers fall back to low dpi ones and ultimately to hardcoded providers (also low dpi), and can also be enabled/disabled via plugin parameter, thus leaving the cache for a given map id dirty for the next run. With this patch high dpi tiles are named differently from low dpi ones. If high-dpi providers are selected, but become not available, the cache can also change the tileset to load at runtime Change-Id: I229692da07c1fc61c58fb0b6fae6ec5af16e43a7 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Refactor prefetching tilesMichal Klocek2016-02-091-68/+17
| | | | | | | | | | | | | | | | | | | | | Current implementation uses same QGeoCameraTiles object to calculate visible tiles and tiles which should be prefetched. This is semi optimal since frustum intersection algorithm uses bunch of different parameters. Simplify the logic and use separate objects, this way values in both cases are cached and calculation is done when required. This is important since prefetchData can be called anytime from map's API. Remove textured tiles from scene when clearCache called, this will force redownload of all the tiles. Add new unit test qgeotiledmap and move prefetch test due to refactoring. Change-Id: I6a906df405f212436cdd35ac76f95b559e6b7aae Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-08-191-0/+1
|\ | | | | | | | | | | | | Conflicts: src/imports/location/qquickgeomapgesturearea.cpp Change-Id: If115a052678b140eee46b8c0d9471b7d96953915
| * Fix issue where tiles are prefetched using both prefetch stylesAaron McCarthy2015-07-291-0/+1
| | | | | | | | | | | | | | | | | | | | Before being made run-time selectable the only a single prefetch style was used. Restore the same behavior by adding a break to the switch statement. Change-Id: Id16a4b11709497df1511b2605c0a9b5837590b3a Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com> Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com>
* | Fix tile version handlingMichal Klocek2015-06-041-1/+1
| | | | | | | | | | | | | | | | | | | | Here maps plugin checks server for tile version. When tile version is updated, update not only the current camera tiles, but also scene tiles. Task-number: QTBUG-44809 Change-Id: Iedb3add5308a2e61cc18e169e33ea4510e1a4fee Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Rename setCamera to setCameraData in qgeocameratilesMichal Klocek2015-06-031-2/+2
|/ | | | | | | Keeps the same function name across all classes. Change-Id: I3f8b723ce513e50ea93a3fd1af99c7d2ba79a11d Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Unify zoom calculationsMichal Klocek2015-05-211-3/+2
| | | | | | | | Make camera calculations in qgeocameratiles and qgeomapscene more obvious. Use the same fractions. Change-Id: I4f156bb894eb2c606df97308ebd1b637408d9f2d Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Fix missing tiles on some zoomLevelsMichal Klocek2015-05-211-2/+3
| | | | | | | | | | | | | | | | When ratio between screen size and tile size was high, frustum far clipping plane was preventing intersection points calculations. Do not use magic value for far clipping plane, since frustum is not used in projection for int zoom level changes, simplify near clipping plane. Near clipping plane should be always smaller than possible altitude value. Far plane should always exceed altitude to allow intersections with z plane. Task-number: QTBUG-45508 Change-Id: I59693ace794de37f0ad3544c11eb0c5a471eeb04 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Refactor fetching calls in QGeoCameraTilesMichal Klocek2015-05-211-69/+72
| | | | | | | | | Introduce dirty flags, remove redundant getters. Change fetch ifdefs to switch case, so all code gets compiled. Change-Id: I610f20098c67089bd2c2684910283f165e1109e0 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Clean up QGeoCameraTilesMichal Klocek2015-05-051-112/+88
| | | | | | | | | This commit: * renames class members to use m_ naming convention * changes private pointer to be QScopedPointer Change-Id: I036db1c859a88b4cd205e233f5547a80af49ef75 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Remove LGPLv2.1 and add GPLv2+ from/to QtLocationAlex Blasche2015-02-191-14/+17
| | | | | | 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>
* Update license headers and add new license filesAntti Kokko2014-08-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: Iedee2507ab1bd46788409a98505d7be510253110 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* Make QtLocation compile with pre-compiled headersAlex Blasche2014-08-121-23/+23
| | | | | | | | | | | | | For some mystical reason Polygon is redefined by an unknown Windows header preventing this file from compiling if Qt is compiled with pre-compiled headers. The workaround is to simply rename this private type. Discussed-in: http://lists.qt-project.org/pipermail/development/2014-May/017125.html Task-number: QTBUG-39692 Change-Id: If71e1a12394dfde7729d0505417a37b9fd407c82 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
* Fix compile warning.Aaron McCarthy2014-03-141-5/+3
| | | | | | | Member initialization order. Change-Id: I83ad846c6297909ad8595114dccf8bf118b467b0 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Tile cache versioning for Nokia mapsAnders Gunnarsson2014-03-031-3/+16
| | | | | | | | | | | | | | | | Added to avoid mixing of different map versions in map view. Generic cache versioning by adding an incremental version number to tile specs and filenames. Default version -1 falls back to not using version in file names for backward compatibility. Nokia specific version management by implementing the version request, comparing all version information and increment the version if anything has changed. Task-number: QTBUG-25559 Change-Id: I6820f2efbe7458701475cc833d3077022797b2df Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Merge branch 'stable' into devAlex Blasche2013-10-221-2/+72
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/location/qdeclarativegeomap.cpp src/imports/location/qdeclarativegeoroute.cpp src/imports/location/qdeclarativegeoroutemodel.cpp src/imports/location/qdeclarativegeoroutesegment.cpp src/imports/location/qdeclarativepolygonmapitem.cpp src/imports/location/qdeclarativepolylinemapitem.cpp src/imports/positioning/positioning.cpp Change-Id: Ieaa5f567d2144d0267e7eef5bd75bde7e0079fbe
| * QtAlgorithms have been deprecated (2 of 2)Alex Blasche2013-10-151-1/+70
| | | | | | | | | | | | | | | | Convert to std algorithms to avoid warnings Change-Id: I348e693fc14d67ad18fddfccd184858386373d23 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
| * QtAlgorithms have been deprecated (1 of 2)Alex Blasche2013-10-111-1/+2
| | | | | | | | | | | | | | | | | | Convert to std algorithms to avoid warnings. One qSort case is still left since it seems to require a more elaborate fix. Task-number: QTBUG-11022 Change-Id: Ieccc5050b127a58ff1f0aa7c488909f2acfa2972 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Make geo coordinates animatable in QML.Albin Olsson2013-10-111-6/+4
|/ | | | | | | | | | | | | | | | | | | | Interpolation logic in AnimatableCoordinate has been moved around so that QGeoCoordinates can be animated directly by QPropertyAnimation. A new QML type has been added, 'CoordinateAnimation', for animating coordinates in QML. This type follows the pattern of 'ColorAnimation' and other specializations of 'PropertyAnimation'. QDoubleVector2D, QDoubleVector3D and QGeoProjection has been moved to QtPositioning Testcase for CoordinateAnimation has been added to declarative_ui. AnimatableCoordinate and QGeoCoordinateInterpolator are redundant and have been removed. Change-Id: I0809da566e1800274384f9c5337df65623d1e61a Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Update copyright year to 2013Sergio Ahumada2013-06-131-1/+1
| | | | | Change-Id: I5b0cb7d56997ad7b91c073b3e02b31d0368fdcfa Reviewed-by: Alex <alexander.blasche@digia.com>
* Fix warnings in qtlocation found by GCC 4.8Thiago Macieira2013-04-071-1/+0
| | | | | | | | | qgeocameratiles.cpp:584:31: warning: typedef ‘iter’ locally defined but not used [-Wunused-local-typedefs] qgeotiledmappingmanagerengine.cpp:237:51: warning: typedef ‘cache_iter’ locally defined but not used [-Wunused-local-typedefs] locationvaluetypeprovider.h:73:10: warning: unused parameter ‘dataSize’ [-Wunused-parameter] Change-Id: I7200cc6094ce55c807b3e6dbbd37b6b94f5e6a57 Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-241-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Ic1390da64a219642fa1e1482a7677a4c2db15cbc Reviewed-by: Janne Anttila <janne.anttila@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix compilation on QNXSean Harmer2012-08-281-5/+5
| | | | | | | | including <cmath> declares the standard maths functions in the std namespace not the global namespace. Change-Id: I293cba5ed166b4f122bb34bca5c1d508e2dda259 Reviewed-by: Aaron McCarthy <aaron.mccarthy@nokia.com>
* Remove Maps from public C++ API.Aaron McCarthy2012-06-071-2/+2
| | | | | | | | | | | | The preliminary C++ Maps API was exposed to provide an interface between the QML plugin and the geo services plugins. Mark it as private API for now as it is likely to change when the full C++ API is developed. Mapping functionality is currently only available through QML. Change-Id: Id16e0f1a2165c70192047dffa40e69ab1f29ba69 Reviewed-by: Alex Wilson <alex.wilson@nokia.com>
* Simple prefetch schemeThomas Lowe2012-05-161-12/+79
| | | | | | | | | | | | | | | | | | | | | Prefetches larger set of tiles when camera is stopped QTBUG-25136 Prefetch implementation including zoom-level prefetching Two prefetching options- pan buffer, or pan buffer for two nearest zoom levels Code simplified by removing all three visibleTiles lists, so they can't go out of sync Textures not promoted up the cache if they aren't visible when retrieved from server Also: Prefetch on map initialize + optimisation This ensures that the prefetch is called at the end of initialisation Useful if the location is not already in disk cache. And makes no difference if it is already in disk cache. QTBUG-25786 Change-Id: Ife7c1d103f83695659f4534880268fa5afd8f7c7 Reviewed-by: Alex Wilson <alex.wilson@nokia.com>
* Coding style fixes: whitespace crusadesAlex Wilson2012-05-151-11/+15
| | | | | | | | | | * Single spaces after keywords and before a bracket/brace * Binary operator spacing * Curlies at open of class/function body * Spacing around some type specifiers/declarations Change-Id: Ie516283e7a39c7ce83071ea8125774c76db611f5 Reviewed-by: Aaron McCarthy <aaron.mccarthy@nokia.com>
* Internal documentation for map geometry and camera tilesIan Chen2012-03-291-1/+34
| | | | | Change-Id: I9191b903471a2b3bf3999e8a3582ee8c90f95eef Reviewed-by: Alex Wilson <alex.wilson@nokia.com>
* Add in qgeocameratiles the ability to grab corner tiles, and fix a floating ↵Ian Chen2012-03-201-62/+153
| | | | | | | point error Change-Id: I034e09ddf75dcf61a4335ccb09a32f7ef39fbfc6 Reviewed-by: David Laing <david.laing@nokia.com>
* New 3Q cache for map tiles, cleanup texture/tile resource managementAlex Wilson2012-03-141-0/+6
| | | | | | | | | | | | Replaces the old use of QCache in QGeoTileCache with a new QCache3Q, which is more optimal for many tile workloads. Resource management for textures and tile data is now enforced and managed correctly across threads. Textures are passed around as QSharedPointers to guarantee that cache eviction policy will not interfere with the correctness of rendering. Change-Id: I93eb49ea3ad009d85f394f92c59a4b22962b88a7 Reviewed-by: Alex Wilson <alex.wilson@nokia.com>
* Cleans up the QGeoCameraData class.David Laing2012-02-161-65/+26
| | | | | | | | | | | | There were some fields that were unused or only used for debugging the prototype of the library which are no longer needed. This removes those fields and renames zoomFactor to zoomLevel - "zoomLevel" is a better name for it, but we need the double type / semantics of zoomFactor. Change-Id: I32ba97ca1b4bccfe33b86c8eccd2c94b12079d2e Reviewed-by: Alex Wilson <alex.wilson@nokia.com>
* Corrects for some uninitialized variable usage.David Laing2012-02-071-1/+3
| | | | | | | Thanks to valgrind for the warnings. Change-Id: Id1ca2b3560f2f1e470844454be0d0e9f7729db2b Reviewed-by: Alex <alex.blasche@nokia.com>
* Cleans up the projection code.David Laing2012-02-021-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There was no longer any point in providing the screen <-> 3d scene position functions, which meant that the projection class was just doing coordinate <-> mercator conversions and intepolating coordinates. The interpolation code was moved out and the mercator conversions were made static. We have future changes coming which will allow people who want different projections to provide them, so it's not to big a deal to specialize the class towards the mercator projection. There were some other small changes made which make the map actually pay attention to the size of the tiles and the maximum zoom level as per the plugin. Actually enforcing the tilt / bearing / zoom parameters will appear in a separate commit before very long. Change-Id: I31dc39165bde123fbe8e3e2e70e401c5d73932b3 Reviewed-by: Alex Wilson <alex.wilson@nokia.com>
* Geometry changes for precision issues.David Laing2012-02-021-3/+39
| | | | | | | | | | | This also removes / cleans up a few classes that are made partially redundant by this change. Change-Id: Ib8118cc3e3df3ecd024a11184ff2523af43d7b03 Task-number: QTBUG-23413 Task-number: QTBUG-23501 Task-number: QTBUG-23166 Reviewed-by: Alex Wilson <alex.wilson@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I00c66363046e475e6924aafd221483c7fad5c0d9 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>