summaryrefslogtreecommitdiff
path: root/src/location/maps/qgeotilefetcher_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Add virtual fetchingEnabled in QGeoTileFetcherPaolo Angelelli2017-07-171-0/+1
| | | | | | | | | | | With this, a plugin can programmatically prevent the fetcher from acessing the network. E.g., by using a QNetworkConfigurationManager. The change introduced in this patch does however not allow the user to dynamically enable/disable the fetcher's network access. For that, additional support, together with public API, is necessary. Change-Id: I8250cd3dc8d4b2c36ccf243b5ddeab2878b549b4 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Make QGeoTileFetcher::handleReply virtualPaolo Angelelli2017-04-281-1/+1
| | | | | | | | Tile fetchers may need to override this one to better analyze the reply content and possibly validate it. Change-Id: Ia3445017ad7b44d719a1ce28b811d9145373e397 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Bound check QGeoTileSpec against min/max ZL before requesting itPaolo Angelelli2017-04-121-2/+2
| | | | | | | | | | | | | | | | | | Until now we have not honored the min/max zoom levels specified in QGeoCameraCapabilities when requesting tiles. As a result we have often fired requests for non-existing tile layers. This change complements the added support for individual camera caps for each map type, and makes the tile fetcher honor the bounds defined in the camera capabilities. This also allows to set larger zoom levels in the renderer, overzooming existing tiles, without the fetcher firing requests for invalid resources Change-Id: Ic8a523a114147109f7ef8af3510a3ab78d06d714 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Fix export macro in private headersPaolo Angelelli2017-02-141-2/+2
| | | | | | | | Changing Q_LOCATION_EXPORT to Q_LOCATION_PRIVATE_EXPORT in all _p headers to avoid confusion. Change-Id: Ic42d1c59f0cd68c27bcf40296c612d005da11efd Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Refactor: move CacheAreas to QAbstractGeoTileCachePaolo Angelelli2017-01-161-1/+1
| | | | | | | | | | | | | | | This change moves QGeoTiledMappingManagerEngine::CacheAreas to the more appropriate container that is QAbstractGeoTileCache, which already uses this enum in its interface. Together with making the virtual init() method of QAbstractGeoTileCache public, instead of protected, this patch effectively disentangle QAbstractGeoTileCache/QGeoFileTileCache from the QGeoTiledMappingManagerEngine, and makes it usable potentially also by other (tile) renderers. Change-Id: Ic635b81660f81d86884cc6b00e3a2ab9420daa9f Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Fix cache mixing with high-dpi and low-dpi osm providersPaolo Angelelli2016-10-051-3/+3
| | | | | | | | | | | | | | | | | 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>
* Add indirection for osm providersPaolo Angelelli2016-07-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To prevent furter breakage of qtlocation osm provider in existing qt versions, this patch introduces one level of indirection in resolving OSM providers, fetching the tile server address from files hosted at http://maps-redirect.qt.io/osm/5.6/ The content of the files requested for the server address resolution must be in JSON format, containing (currently) the following fields: { "Enabled" : bool, (optional) "UrlTemplate" : "<url template>", (mandatory) "ImageFormat" : "<image format>", (mandatory) "MapCopyRight" : "<copyright>", (mandatory) "DataCopyRight" : "<copyright>", (mandatory) "MinimumZoomLevel" : <minimumZoomLevel>, (optional) "MaximumZoomLevel" : <maximumZoomLevel>, (optional) } Enabled is optional, and allows us to temporarily disable tile providers if they go offline without firing requests to them. Default is true. MinimumZoomLevel and MaximumZoomLevel are also optional, and allow us to prevent tile requests to the providers, if they do not support the specific ZL. Default is 0 and 19, respectively. <server address template> is required, and is the tile url template, with %x, %y and %z as placeholders for the actual parameters. Example: http://localhost:8080/maps/%z/%x/%y.png <image format> is required, and is the format of the tile. Example: "png" or "jpg" <MapCopyRight> is required and is the string that will be displayed in the "Map (c)" part of the on-screen copyright notice. example: "<a href='http://www.mapquest.com/'>MapQuest</a>" <DataCopyRight> is required and is the string that will be displayed in the "Data (c)" part of the on-screen copyright notice. example: "a href= 'http://www.openstreetmap.org/copyright'>OpenStreetMap</a> contributors" The patch also adds four additional OSM plugin parameters, modifies an existing ones, and removes another existing one. Removed: - osm.mapping.copyright, now removed and replaced by two other parameters (see below). New: - osm.mapping.providersrepository.address, allowing to change the hardcoded http://maps-redirect.qt.io/osm/5.6/ The implication of this parameter is that it becomes possible to use file:// urls or even qrc:, allowing to ship custom providers with the applicarions - osm.mapping.providersrepository.disabled, allowing to disable the indirection and go with hardcoded URLs by default. - osm.mapping.custom.mapcopyright replaces the old osm.mapping.copyright, and contains the copyright notice to be displayed next to the "Map (c)" part of the copyright, to be consistent with the way the copyright notice coming from the provider data is handled - osm.mapping.custom.datacopyright replaces the old osm.mapping.copyright, and contains the copyright notice to be displayed next to the "Data (c)" part of the copyright, to be consistent with the way the copyright notice coming from the provider data is handled Modified: - osm.mapping.host now became osm.mapping.custom.host, improving the naming consistency. Task-number: QTBUG-54599 Change-Id: Iee88883572a198c00bcf54cf2bc33fbcc0498a68 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>
* Test that the mapping manager engine pointer is still valid.Aaron McCarthy2014-02-101-4/+1
| | | | | | | | | | | | | | | | | | | 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>
* Fix killing timer in different thread.Aaron McCarthy2014-01-171-1/+1
| | | | | | | | It was possible for another thread to attempt to stop the timer used by the tile fetcher. Change-Id: Ic44cf416bc7e6c987c4b5c9914a1c7d911dbbea5 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Remove use of QT_{BEGIN,END}_HEADER macros.Aaron McCarthy2013-02-031-4/+0
| | | | | | | | | These macros were removed from Qt Core and they are no longer defined causing Qt Location to fail to build. Change-Id: Ibed30daa1a802957cebe95a577dfe86f0f643970 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
* Change copyright from 2012 to 2013Rainer Keller2013-01-171-1/+1
| | | | | Change-Id: I61ae1bd1a9f68d120d4e11635f306374b1f494d0 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>
* Remove Maps from public C++ API.Aaron McCarthy2012-06-071-25/+46
| | | | | | | | | | | | 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>
* Coding style fixes: whitespace around pointers/referencesAlex Wilson2012-05-151-1/+1
| | | | | | Change-Id: Ie527591e2d9a1578137136fb6664e86c43eed1bf Reviewed-by: Thomas Lowe <thomas.lowe@nokia.com> Reviewed-by: Alex Wilson <alex.wilson@nokia.com>
* Fixed -qtnamespace compilation issues.Rohan McGovern2012-05-151-2/+2
| | | | | | | | Forward declaration of classes should come after QT_BEGIN_NAMESPACE, if the declared classes are expected to be inside the qtnamespace. Change-Id: I68884ec6f6f08ead6a125f3bc099a342ac62c78a Reviewed-by: Alex Wilson <alex.wilson@nokia.com>
* Coding style fixes, round #1Alex Wilson2012-05-151-1/+1
| | | | | | | | | | | In this patch: * Assignment operators that don't check for self-assignment * Using const references where possible in function arguments * Using const refs in the iterator var of a foreach() loop * Add 'explicit' to constructors taking one parameter Change-Id: I640fd85c3312851f0d8c10193333efec41232e05 Reviewed-by: Aaron McCarthy <aaron.mccarthy@nokia.com>
* Fixes various Coverity warnings.David Laing2012-03-161-1/+0
| | | | | Change-Id: I58a7191dae9cd441025cad658d82422561f216f6 Reviewed-by: Aaron McCarthy <aaron.mccarthy@nokia.com>
* New 3Q cache for map tiles, cleanup texture/tile resource managementAlex Wilson2012-03-141-0/+3
| | | | | | | | | | | | 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>
* Refactoring of QtLocation APIBasel Hashisho2012-03-091-0/+92
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>