summaryrefslogtreecommitdiff
path: root/src/plugins/geoservices/nokia/qgeotilefetcher_nokia.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>
* Cleanup: use nullptr instead of 0Volker Hilsheimer2022-09-131-1/+1
| | | | | Change-Id: I2f713a9a88023c5e2b3d779ebe73c821c72dd0e3 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Port to pointer-to-member-function connection syntaxVolker Hilsheimer2022-08-231-2/+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>
* Use 'const' correctlyVolker Hilsheimer2022-07-281-1/+1
| | | | | | | | | | 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>
* 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>
* Revert "qtlocation: remove uses of the deprecated member-function"Timur Pocheptsov2020-02-251-4/+4
| | | | | | | | This reverts commit b482674e51c097fccffa1e1cc32b4843ad393894. Reason for revert: naming in QProcess is considered to be the correct one. Change-Id: I6722adfc06b351c76fb432628a678c4ce887d594 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* qtlocation: remove uses of the deprecated member-functionTimur Pocheptsov2020-01-151-4/+4
| | | | | | | | | Which is QNetworkReply::error(). Use QNetworkReply::networkError() instead. Task-number: QTBUG-80369 Change-Id: Id41166a72c0d14bc77d9ec853db2f665617195ee Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix for mobile maps from the HERE plugin not showing in low-dpiPaolo Angelelli2017-05-081-1/+8
| | | | | | | | Apparently these maps support only 250ppi or more. Task-number: QTBUG-60545 Change-Id: Iadb59c4f034cbfd94a825048358583f3a978315f Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Use HiDpi tiles to produce crisper maps at fractional zoom levelsPaolo Angelelli2016-07-011-11/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Add "here" prefix to all Here geoservices parametersAlex Blasche2015-05-271-4/+4
| | | | | | | Task-number: QTBUG-42151 Change-Id: I3d71ee77327478dfdda23af709bee489f83bb9f6 Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Set shorter name for class names with 'MapData'Michal Klocek2015-05-041-1/+1
| | | | | | | | Rename all references and files with 'MapData' to use shorter name 'Map'. Change-Id: I8ab790146ee28e540e6866ba0218eea61bae6e64 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Remove all Nokia specific license details.Alex Blasche2015-02-261-7/+0
| | | | | | | | | | | | The terms and conditions were not accurate anymore. Instead we refer to the relevant URL. In general the Nokia plugin is no different than other plugins. The user must comply with each services T&Cs. Nokia and Ovi don't exist anymore. The service runs under the Here term these days. Change-Id: Ie73b5cc9577946a2e1ce433ed67e0bca0b894a57 Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.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>
* Fix some typosSergio Ahumada2014-03-031-1/+1
| | | | | Change-Id: If46057e48040fda7b61b81e735c171daf2cc7d06 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Tile cache versioning for Nokia mapsAnders Gunnarsson2014-03-031-5/+51
| | | | | | | | | | | | | | | | 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>
* Use 512 pixel tiles from the Nokia/HERE service.Aaron McCarthy2014-02-261-8/+5
| | | | | | Task-number: QTBUG-36949 Change-Id: I80fe3762b7e8f4dc1b7d56a43d6ab22788c0b702 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Test that the mapping manager engine pointer is still valid.Aaron McCarthy2014-02-101-26/+19
| | | | | | | | | | | | | | | | | | | QPointer holds a guarded pointer to a QObject. It must always be tested prior to use. Changed the parameter type to remove the need for the static_cast when setting the QPointer member. The root cause was that the tile fetcher object was not being destroyed when the mapping manager engine was. Which was because the two objects were in different threads. Some of the service specific tile fetchers were directly calling into the engine objects across thread. Gah. Since Qt 5 QNAM uses an application global thread for processing requests, there is no need to use threads in the tile fetcher. Change-Id: Id9df35ddfa78df2cbf334006fe5fc9726a75f92d Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Remove dependency between MapStyle and Nokia map schemesAnders Gunnarsson2014-02-071-41/+5
| | | | | | | | | | | Makes it possible to add Nokia base schemes without adding new MapStyles. Removes the redundant collection of base schemes. Change-Id: Ia2189a3f10ba47cc40087b7d4fee9a2c5d84caad Reviewed-by: Alex Blasche <alexander.blasche@digia.com> Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
* Nokia plug-in URL and tiler API updatesAnders Gunnarsson2014-02-071-7/+54
| | | | | | | | | | | | | | | | | | Updated URLs for places and map tiler to current ones. Added URL management for additional hosts for hybrid, terrain and satellite maps. Added new languages and map types available in the new tiler API. Bug fixes for code evaluating copyrights text to show. Now only copyrights related to viewed maps are shown and each name is shown only once. Updated drawing of copyright information to show HERE logo and copyrights text side by side. This is to avoid having logo jumping up and down. Change-Id: Ide18a95335c4299c8219c4dbcfb0cc60b43d46c3 Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Fix crash in tile fetcher when no engine is set.Aaron McCarthy2014-02-041-13/+17
| | | | | | | | The engine is stored in a QPointer. The pointer must be checked for validity before use. Change-Id: I07eaf9276511273735f000ce0eb9cdf2fe130df3 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Use QVariantMap instead of QMap<QString, QVariant>.Aaron McCarthy2014-01-081-1/+1
| | | | | | | | It is shorter, easier to read, easier to type and it doesn't affect the ABI. Change-Id: Ic4d8a371d00b434ac84382dd75d8d82a963089cb 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>
* 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>
* Remove Maps from public C++ API.Aaron McCarthy2012-06-071-1/+1
| | | | | | | | | | | | 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>
* Correct destruction of mappingManagerEngineThomas Lowe2012-05-291-6/+8
| | | | | | | | | | | Use of weakPointer to prevent accessing deleted memory. Plus thread exiting to cause the fetcher and thread to destroy themselves. Additional use of weak pointers to deal with the complexity of the mapping manager destructing before the declarative objects. Task-number: QTBUG-25797 Change-Id: I6a27568580c1a00f7588565ff7e35d63eb5dd785 Reviewed-by: Aaron McCarthy <aaron.mccarthy@nokia.com>
* QtLocation/Nokia plugin: Removed service authentication data and refs.Jean Gressmann2012-05-251-6/+0
| | | | | | | Task-number: QTBUG-25497 Change-Id: I43357def9db11bfbe5f9fe14c963f22f11f05310 Reviewed-by: Jean Gressmann <jean.gressmann@nokia.com>
* Renamed terms and conditions as Nokia.Chris Axiarlis2012-05-161-3/+3
| | | | | | | | | The OVI name was discontinued last year. This change reflects this change. Also the product is no longer called mobility. Change-Id: Ib6653eef8ad117f8bfd527719994661223d6c6e9 Reviewed-by: abcd <amos.choy@nokia.com> Reviewed-by: Alex <alex.blasche@nokia.com>
* Add support for language setting in the plugin.Chris Axiarlis2012-05-161-0/+39
| | | | | | | | | Added support for handling the languages in the plugin based on the locale. Allowing for flexibility based on other paramaters which cannot be determined simply from the language. Change-Id: I37302cb14d84f865898b8aaa9b41be2ae8075352 Reviewed-by: Aaron McCarthy <aaron.mccarthy@nokia.com>
* China shifting support for dual simvladimirb2012-05-161-130/+55
| | | | | Change-Id: I278bad0a8b167a3a40c8e737622a83683e966e64 Reviewed-by: Alex Wilson <alex.wilson@nokia.com>
* Coding style fixes: whitespace around pointers/referencesAlex Wilson2012-05-151-7/+7
| | | | | | Change-Id: Ie527591e2d9a1578137136fb6664e86c43eed1bf Reviewed-by: Thomas Lowe <thomas.lowe@nokia.com> Reviewed-by: Alex Wilson <alex.wilson@nokia.com>
* Change uses of {to,from}Ascii to {to,from}Latin1Thiago Macieira2012-05-081-2/+2
| | | | | | | | | | This operation should be a no-op anyway, since at this point in time, the fromAscii and toAscii functions simply call their fromLatin1 and toLatin1 counterparts. Task-number: QTBUG-21872 Change-Id: I2e16486d80df6257ab88dc8c3b5d9dd497a19708 Reviewed-by: Aaron McCarthy <aaron.mccarthy@nokia.com>
* Wrap network access to enable testing in Nokia pluginJean Gressmann2012-04-271-28/+10
| | | | | | | | | This enables subsequent testing of the stack (from C++) without being connected to the network. Change-Id: I55ad5ece9c323ec82a493d059f1418f68169c5e6 Task-number: QTBUG-25416 Reviewed-by: Alex Wilson <alex.wilson@nokia.com>
* QtLocation/Nokia plugin: Print usage terms fixupJean Gressmann2012-04-201-23/+0
| | | | | | | | | | | | Instead of only printing the usage terms when using the tile mapping service the terms are now printed regardless of the service used from Nokia's location plugin. Note that the usage terms are only printed at most once per plugin initialization. Change-Id: I665ed97552c811e0f5e2b06a7ff1d522f823601a Reviewed-by: Aaron McCarthy <aaron.mccarthy@nokia.com>
* Coverity and compiler warning fixesAlex Wilson2012-04-191-4/+5
| | | | | Change-Id: Iae536630edbfbda2c0e8c67c48477d5867d25f07 Reviewed-by: Aaron McCarthy <aaron.mccarthy@nokia.com>
* Added support for proxy autodetection.Cristian Adam2012-03-291-1/+5
| | | | | Change-Id: Icef793831e54f0333e9872293859b9009a7164cf Reviewed-by: Alex Wilson <alex.wilson@nokia.com>
* Document application credential requirements for Nokia plugin.Aaron McCarthy2012-03-261-1/+1
| | | | | | | | | Document that it is required that an application developer using the Qt Location API needs to obtain an application id and token pair from Nokia to be able to use the "nokia" geoservices plugin. Change-Id: I4f2275a2f31cf93be6ffab8a666e2839f567e0f7 Reviewed-by: Alex Wilson <alex.wilson@nokia.com>
* Uniform usage of proxy, app_id, and, token for all managers.Cristian Adam2012-03-261-10/+7
| | | | | | | | There is no reason to have different <service>.proxy, <service.app_id <service>.token parameters, since they are the same for all services. Change-Id: Ie17c39ac5fd94027ce477267f9e957d4cc4a5e1b Reviewed-by: Alex Wilson <alex.wilson@nokia.com>
* Implementation of copyrights notice handling for Nokia online plugin.bhashish2012-03-221-3/+47
| | | | | | | | | | | | | | | | Introducing classes QGeoCopyrightsCacheNokia, QGeoMapCopyrightsContext. - QGeoCopyrightsCacheNokia: Provides shared copyrights fetching and lookup services and is common for all maps generated by QGeoTiledMappingManagerEngineNokia, hence its instance is owned by the engine. - QGeoMapCopyrightsContext: Encapsulates copyrights info for last rendered frame per QGeoTiledMapDataNokia class, and is passed to QGeoCopyrightsCacheNokia::evaluateContext(...) to evaluate the validity of last copyrights notice upon signaling by base QGeoTiledMapData. Change-Id: I23cb378d51670c4fa124ac607c71f199e9520cb0 Reviewed-by: Alex Wilson <alex.wilson@nokia.com>
* Fixed app_id and token usage.Cristian Adam2012-03-201-25/+10
| | | | | | | | | | | | The warning that no app_id and token were passed was given also when valid app_id and token were passed. Paved the way for complete referrer removal. The old referrer and token qtlocation authentification is still used as backup. Change-Id: Iff6e2076d253d07a1677985ad88c72b99e211ab6 Reviewed-by: Cristian Adam <cristian.adam@nokia.com> Reviewed-by: Alex <alex.blasche@nokia.com>
* Remove old nokia-plugin disk cache, fairer server load-balancingAlex Wilson2012-03-201-48/+4
| | | | | | | Using qrand() instead of the old modulo approach. Change-Id: I9424f8a83cab189eed64e4017f2d7be50aec2283 Reviewed-by: David Laing <david.laing@nokia.com>
* Build fix when use '-no-stl' optionYuchen Deng2012-03-191-0/+2
| | | | | | | | error C2039: 'map' : is not a member of 'std' error C2143: syntax error : missing ';' before '<' Change-Id: I3c77ca1f658f3ff5f5819760c242bf0bf26d2955 Reviewed-by: Alex <alex.blasche@nokia.com>
* Fixes various Coverity warnings.David Laing2012-03-161-15/+16
| | | | | Change-Id: I58a7191dae9cd441025cad658d82422561f216f6 Reviewed-by: Aaron McCarthy <aaron.mccarthy@nokia.com>
* Refactoring of QtLocation APIBasel Hashisho2012-03-091-0/+375
Refactoring QGeoMap, QGeoMappingManager, QGeoMappingManagerEngine Introducing QGeoMapData, QGeoTiledMap, QGeoTiledMappingManagerEngine, QGeoTileFetcher QGeoMap: Container for QGeoMapData QGeoMapData: No tiles data/functionality QGeoTiledMapData: Implements tiles data/functionality. QGeoMappingManager: Looses tiles-related data/functionality. QGeoMappingManagerEngine => QGeoMappingManagerEngine (no tiles data/functionality) QGeoTiledMappingManagerEngine (implements tiles-related data/functionality). QGeoTileFetcher: Implements tile fetching functionality from tiles provider. This commit compiles and runs through mapviewer example. Tests also were adjusted to fit refactored architecture. Change-Id: Id2b62d62d5cd4aaca8295c67e44c009cde636462 Reviewed-by: Alex <alex.blasche@nokia.com>