| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Change-Id: Iaa670de181255ea570fcf7bcbe465987ef7fc2fc
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
| |
This patch fixes the case of disabling the various caches.
Currently setting the cache size to 0 results in default initial values
instead.
Change-Id: I019cd15ac23b6479e4367a3e102dd661895a7fda
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
This patch moves the implementation of the default filenameToTileSpec
and tileSpecToFileName methods into standalone public static methods
so that they can be possibly reused by plugins or other components,
since these implementations do not actually depend on any member of
QGeoFileTileCache.
Change-Id: I6e3f59615ff3a5e0924f946aa13aabebb8157e42
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In certain cases servers provide tiles that can be fully transparent,
provide no content or are bogus.
Tile fetchers can be smart and detect some of these cases.
This patch offers an extensible way to allow them to communicate (via
a null QImage) tiles that should not be rendered, in addition to
an extensible mechanism to identify such tiles on disk.
The default way is by assuming that, once such tiles have been
detected, the tile fetcher would simply write a file with "NoRetry" as
content.
Change-Id: I404bb4dcc38fdd33c412f7407601b47947e4ce8d
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
During initialization, this patch makes sure that the cached
tiles belong to the provider currently in use by using the file
lastModified() value and comparing it against the (optional)
Timestamp in the provider records.
If this value is not present in the provider record, or if it
is older than the newest modified file, the data is untouched.
This operation is performed separately for each map id.
This method isn't perfect in all use cases, though.
E.g., if we are forced to shut down one of the provider
and run on the hardcoded fallback, which has an older TS.
These are however rare edge cases that most likely won't
happen in practice (in the case above we could put the
content of the hardcoded provider in the remote json
files too)
Change-Id: Ie29cf05c1fbc835ce4e3363fc0caa38a97800214
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch contains improvements for the OSM geoservice plugin, in form
of property-controllable disk cache, and the support for a directory
containing an offline dataset.
The offline directory can contain subdirectories also in form of
symlinks. If duplicate tiles are present, the newest is used.
The population of the offline tiles registry is offloaded to a
thread to prevent blocking the startup of the application.
No synchronization is used (except on cache destruction),
so that, as the tiles are being indexed, they can be used in
the application.
For the time being, no support is given to populate such directory
(mostly due to current API limitations), but tiles can be placed
manually, for example copying them from the disk cache directory.
Task-number: QTBUG-45284
Change-Id: I518980669a3ee474545025adf05adc69cdd29781
Reviewed-by: Paolo Angelelli <paolo.angelelli@theqtcompany.com>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
| |
Currently the qgeofiletilecache/qgeofiletilecachemapbox contains a bug
in that it makes use of virtual functions in the constructor.
This patch fixes it by moving those calls into a virtual init()
method that is called by QGeoTiledMappingManagerEngine::setTileCache()
Change-Id: Icf7932dfbae7d99eef22c67e034246a834212a03
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
Add clearData call to clear texture, memory and disk
cache. Update mapviewer example and add "prefetchData"
and "clearData" to Tools menu.
Task-number: QTBUG-47292
Change-Id: Ifc71a3652688d1403f5b011ef231b59381c17ee3
Reviewed-by: Harald Meyer <dev@meh.at>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
|
|
|
|
|
|
| |
Initialize QGeoTileTexture with QImage instead of
converting from QPixmap
Change-Id: I69dddda385ebc9ce63cb0dd68fee3d3fa6eed73f
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This update adds a new method "setTileCache" to the
QGeoTiledMappingManagerEngine class. The method allows custom
map implementations to set their own cache.
The update also fixes a compiler warning (ctor variable order) and
adds Q_DECL_OVERRIDE checks.
Change-Id: I22cfdb218ae5c9af145d688f11aab655f4ed3e4b
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
The QGeoTileCache is split into two classes:
The abstract class QAbstractGeoTileCache offers interfaces for inserting
and getting tiles, as well as getting cache status information such as
used texture memory.
The new class QGeoFileTileCache implements QAbstractGeoTileCache and offers
a file based caching implementation (the implementation is the same
as before splitting the class).
Change-Id: I2eab7491d489ac5b251c1296b67688901f5cc7d7
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
|