summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli@theqtcompany.com>2016-08-11 11:59:21 +0200
committerPaolo Angelelli <paolo.angelelli@theqtcompany.com>2016-08-26 14:05:56 +0000
commit832030f271105a96bdde70b0526df659f21de565 (patch)
treea75f5bd9e7e62635e360170a3228ca65eb10fdcc
parent9305015c3171dfe944e967081e879a365ca9a63f (diff)
Set lowDPI tiles to be the default
Since HighDPI tiles are currently causing severe performance penalties on mobile devices (at least iOS devices), this patch sets the default mode to highdpi = false. Change-Id: I2f99e3955ecccd905e8962d005421d1b5276ea84 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Michal Klocek <michal.klocek@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
-rw-r--r--src/location/doc/src/plugins/mapbox.qdoc2
-rw-r--r--src/location/doc/src/plugins/nokia.qdoc2
-rw-r--r--src/plugins/geoservices/mapbox/qgeotiledmappingmanagerenginemapbox.cpp6
-rw-r--r--src/plugins/geoservices/nokia/qgeotiledmappingmanagerengine_nokia.cpp6
4 files changed, 8 insertions, 8 deletions
diff --git a/src/location/doc/src/plugins/mapbox.qdoc b/src/location/doc/src/plugins/mapbox.qdoc
index 449df330..eb18354a 100644
--- a/src/location/doc/src/plugins/mapbox.qdoc
+++ b/src/location/doc/src/plugins/mapbox.qdoc
@@ -81,7 +81,7 @@ The following table lists optional parameters that can be passed to the Mapbox p
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.
+ \li Whether or not to request high dpi tiles. Valid values are \b true and \b false. The default value is \b false.
\row
\li useragent
\li User agent string set when making network requests.
diff --git a/src/location/doc/src/plugins/nokia.qdoc b/src/location/doc/src/plugins/nokia.qdoc
index c13cec36..91a9fe9a 100644
--- a/src/location/doc/src/plugins/nokia.qdoc
+++ b/src/location/doc/src/plugins/nokia.qdoc
@@ -106,7 +106,7 @@ a prefix.
\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.
+ \li Whether or not to request high dpi tiles. Valid values are \b true and \b false. The default value is \b false.
\row
\li here.geocoding.host
\li Geocoding service URL used by geocoding manager.
diff --git a/src/plugins/geoservices/mapbox/qgeotiledmappingmanagerenginemapbox.cpp b/src/plugins/geoservices/mapbox/qgeotiledmappingmanagerenginemapbox.cpp
index 2f1a29c1..4a89a898 100644
--- a/src/plugins/geoservices/mapbox/qgeotiledmappingmanagerenginemapbox.cpp
+++ b/src/plugins/geoservices/mapbox/qgeotiledmappingmanagerenginemapbox.cpp
@@ -108,11 +108,11 @@ QGeoTiledMappingManagerEngineMapbox::QGeoTiledMappingManagerEngineMapbox(const Q
setSupportedMapTypes(mapTypes);
- int scaleFactor = 2;
+ int scaleFactor = 1;
if (parameters.contains(QStringLiteral("mapbox.highdpi_tiles"))) {
const QString param = parameters.value(QStringLiteral("mapbox.highdpi_tiles")).toString().toLower();
- if (param == "false")
- scaleFactor = 1;
+ if (param == "true")
+ scaleFactor = 2;
}
QGeoTileFetcherMapbox *tileFetcher = new QGeoTileFetcherMapbox(scaleFactor, this);
diff --git a/src/plugins/geoservices/nokia/qgeotiledmappingmanagerengine_nokia.cpp b/src/plugins/geoservices/nokia/qgeotiledmappingmanagerengine_nokia.cpp
index 2ca5d7f1..8fcaba6a 100644
--- a/src/plugins/geoservices/nokia/qgeotiledmappingmanagerengine_nokia.cpp
+++ b/src/plugins/geoservices/nokia/qgeotiledmappingmanagerengine_nokia.cpp
@@ -95,11 +95,11 @@ QGeoTiledMappingManagerEngineNokia::QGeoTiledMappingManagerEngineNokia(
types << QGeoMapType(QGeoMapType::CarNavigationMap, tr("Car Navigation Map"), tr("Normal map view in daylight mode for car navigation"), false, false, 21);
setSupportedMapTypes(types);
- int ppi = 250;
+ int ppi = 72;
if (parameters.contains(QStringLiteral("here.mapping.highdpi_tiles"))) {
const QString param = parameters.value(QStringLiteral("here.mapping.highdpi_tiles")).toString().toLower();
- if (param == "false")
- ppi = 72;
+ if (param == "true")
+ ppi = 250;
}
QGeoTileFetcherNokia *fetcher = new QGeoTileFetcherNokia(parameters, networkManager, this, tileSize(), ppi);