diff options
author | Paolo Angelelli <paolo.angelelli@theqtcompany.com> | 2016-06-28 16:27:09 +0200 |
---|---|---|
committer | Paolo Angelelli <paolo.angelelli@theqtcompany.com> | 2016-07-01 09:29:11 +0000 |
commit | c2329ca8fb48aac7da1694f4b9c3d28924feae63 (patch) | |
tree | 4031363229220cf4617f689799340013b9fa091a /src/location/doc | |
parent | a10b6b5bf6ed29f705c2e3dd85c1206a96171f60 (diff) | |
download | qtlocation-c2329ca8fb48aac7da1694f4b9c3d28924feae63.tar.gz |
Use HiDpi tiles to produce crisper maps at fractional zoom levels
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>
Diffstat (limited to 'src/location/doc')
-rw-r--r-- | src/location/doc/src/plugins/mapbox.qdoc | 3 | ||||
-rw-r--r-- | src/location/doc/src/plugins/nokia.qdoc | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/location/doc/src/plugins/mapbox.qdoc b/src/location/doc/src/plugins/mapbox.qdoc index 0b989218..449df330 100644 --- a/src/location/doc/src/plugins/mapbox.qdoc +++ b/src/location/doc/src/plugins/mapbox.qdoc @@ -80,6 +80,9 @@ The following table lists optional parameters that can be passed to the Mapbox p "jpg70", "jpg80", "jpg90" (JPEG with 70%, 80% and 90% compression). Defaults to "png". \row + \li mapbox.highdpi_tiles + \li Whether or not to request high dpi tiles. Valid values are \b true and \b false. The default value is \b true. +\row \li useragent \li User agent string set when making network requests. \row diff --git a/src/location/doc/src/plugins/nokia.qdoc b/src/location/doc/src/plugins/nokia.qdoc index 1ed5e6e1..c13cec36 100644 --- a/src/location/doc/src/plugins/nokia.qdoc +++ b/src/location/doc/src/plugins/nokia.qdoc @@ -105,6 +105,9 @@ a prefix. \li here.mapping.cache.texture.size \li Map tile texture cache size in bytes. Default size of the cache is 6MB. Note that the texture cache has a hard minimum size which depends on the size of the map viewport (it must contain enough data to display the tiles currently visible on the display). This value is the amount of cache to be used in addition to the bare minimum. \row + \li here.mapping.highdpi_tiles + \li Whether or not to request high dpi tiles. Valid values are \b true and \b false. The default value is \b true. +\row \li here.geocoding.host \li Geocoding service URL used by geocoding manager. \row |