summaryrefslogtreecommitdiff
path: root/src/plugins/geoservices
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-05-26 03:00:44 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-05-26 03:00:44 +0200
commit1ab2112cfc68dbb3d54bebc83ffaece8a6d8e1c5 (patch)
treee065254d1814fce0eaaac43bc132c19571c3eadc /src/plugins/geoservices
parentde884ff5669fb9a6c0f50e69d6eb2557ca9dea94 (diff)
parent8a7c9fa1a705f7a2fb3f066b755faaa2f4064ceb (diff)
downloadqtlocation-1ab2112cfc68dbb3d54bebc83ffaece8a6d8e1c5.tar.gz
Merge remote-tracking branch 'origin/5.11' into dev
Change-Id: I62794d052a60f4078d3c6aa3912df5893f7a8585
Diffstat (limited to 'src/plugins/geoservices')
-rw-r--r--src/plugins/geoservices/mapbox/qgeoroutingmanagerenginemapbox.cpp6
-rw-r--r--src/plugins/geoservices/mapboxgl/mapboxgl.pro5
-rw-r--r--src/plugins/geoservices/mapboxgl/qgeomapmapboxgl.cpp2
-rw-r--r--src/plugins/geoservices/mapboxgl/qmapboxglstylechange.cpp5
-rw-r--r--src/plugins/geoservices/mapboxgl/qsgmapboxglnode.cpp4
5 files changed, 17 insertions, 5 deletions
diff --git a/src/plugins/geoservices/mapbox/qgeoroutingmanagerenginemapbox.cpp b/src/plugins/geoservices/mapbox/qgeoroutingmanagerenginemapbox.cpp
index 73bca2f7..e8db635f 100644
--- a/src/plugins/geoservices/mapbox/qgeoroutingmanagerenginemapbox.cpp
+++ b/src/plugins/geoservices/mapbox/qgeoroutingmanagerenginemapbox.cpp
@@ -75,8 +75,14 @@ void QGeoRouteParserOsrmV5ExtensionMapbox::updateQuery(QUrlQuery &query) const
if (!m_accessToken.isEmpty())
query.addQueryItem(QLatin1String("access_token"), m_accessToken);
+ query.addQueryItem(QLatin1String("annotations"), QLatin1String("duration,distance,speed,congestion"));
+
query.addQueryItem(QLatin1String("voice_instructions"), QLatin1String("true"));
query.addQueryItem(QLatin1String("banner_instructions"), QLatin1String("true"));
+ query.addQueryItem(QLatin1String("roundabout_exits"), QLatin1String("true"));
+
+ QLocale::MeasurementSystem unit = QLocale::system().measurementSystem();
+ query.addQueryItem(QLatin1String("voice_units"), unit == QLocale::MetricSystem ? QLatin1String("metric") : QLatin1String("imperial"));
}
static QVariantMap parseMapboxVoiceInstruction(const QJsonObject &voiceInstruction)
diff --git a/src/plugins/geoservices/mapboxgl/mapboxgl.pro b/src/plugins/geoservices/mapboxgl/mapboxgl.pro
index 17b6f53a..9a586ff6 100644
--- a/src/plugins/geoservices/mapboxgl/mapboxgl.pro
+++ b/src/plugins/geoservices/mapboxgl/mapboxgl.pro
@@ -22,6 +22,11 @@ SOURCES += \
qmapboxglstylechange.cpp \
qsgmapboxglnode.cpp
+# Mapbox GL Native is always a static
+# library linked to this plugin
+QMAKE_CXXFLAGS += \
+ -DQT_MAPBOXGL_STATIC
+
RESOURCES += mapboxgl.qrc
OTHER_FILES += \
diff --git a/src/plugins/geoservices/mapboxgl/qgeomapmapboxgl.cpp b/src/plugins/geoservices/mapboxgl/qgeomapmapboxgl.cpp
index c04aa5e3..dfebc20d 100644
--- a/src/plugins/geoservices/mapboxgl/qgeomapmapboxgl.cpp
+++ b/src/plugins/geoservices/mapboxgl/qgeomapmapboxgl.cpp
@@ -138,7 +138,7 @@ QSGNode *QGeoMapMapboxGLPrivate::updateSceneGraph(QSGNode *node, QQuickWindow *w
if (m_useFBO) {
static_cast<QSGMapboxGLTextureNode *>(node)->resize(m_viewportSize, window->devicePixelRatio());
} else {
- map->resize(m_viewportSize, m_viewportSize * window->devicePixelRatio());
+ map->resize(m_viewportSize);
}
}
diff --git a/src/plugins/geoservices/mapboxgl/qmapboxglstylechange.cpp b/src/plugins/geoservices/mapboxgl/qmapboxglstylechange.cpp
index f401707b..964f94f5 100644
--- a/src/plugins/geoservices/mapboxgl/qmapboxglstylechange.cpp
+++ b/src/plugins/geoservices/mapboxgl/qmapboxglstylechange.cpp
@@ -536,7 +536,7 @@ QSharedPointer<QMapboxGLStyleChange> QMapboxGLStyleAddSource::fromMapParameter(Q
Q_ASSERT(param->type() == "source");
static const QStringList acceptedSourceTypes = QStringList()
- << QStringLiteral("vector") << QStringLiteral("raster") << QStringLiteral("geojson");
+ << QStringLiteral("vector") << QStringLiteral("raster") << QStringLiteral("raster-dem") << QStringLiteral("geojson");
QString sourceType = param->property("sourceType").toString();
@@ -550,9 +550,10 @@ QSharedPointer<QMapboxGLStyleChange> QMapboxGLStyleAddSource::fromMapParameter(Q
break;
case 0: // vector
case 1: // raster
+ case 2: // raster-dem
source->m_params[QStringLiteral("url")] = param->property("url");
break;
- case 2: { // geojson
+ case 3: { // geojson
auto data = param->property("data").toString();
if (data.startsWith(':')) {
QFile geojson(data);
diff --git a/src/plugins/geoservices/mapboxgl/qsgmapboxglnode.cpp b/src/plugins/geoservices/mapboxgl/qsgmapboxglnode.cpp
index 7721fe61..ed594b56 100644
--- a/src/plugins/geoservices/mapboxgl/qsgmapboxglnode.cpp
+++ b/src/plugins/geoservices/mapboxgl/qsgmapboxglnode.cpp
@@ -62,10 +62,10 @@ void QSGMapboxGLTextureNode::resize(const QSize &size, qreal pixelRatio)
{
const QSize& minSize = size.expandedTo(minTextureSize);
const QSize fbSize = minSize * pixelRatio;
- m_map->resize(minSize, fbSize);
+ m_map->resize(minSize);
m_fbo.reset(new QOpenGLFramebufferObject(fbSize, QOpenGLFramebufferObject::CombinedDepthStencil));
- m_map->setFramebufferObject(m_fbo->handle());
+ m_map->setFramebufferObject(m_fbo->handle(), fbSize);
QSGPlainTexture *fboTexture = static_cast<QSGPlainTexture *>(texture());
if (!fboTexture) {