From 4b05f361d32a355c34278656ab0eb473f787fb4c Mon Sep 17 00:00:00 2001 From: "Thiago Marcos P. Santos" Date: Sat, 24 Feb 2018 21:18:07 +0200 Subject: Bump Mapbox GL to the latest version New features like: - Heatmaps - Better label rendering - Bugfixes mapbox-gl-native @ 27b21363e62c105db0b040b4c5a5ef31170ebd30 Change-Id: I443fb91ba42065b0de101d13c3bf51713ed01a89 Reviewed-by: Qt CI Bot Reviewed-by: Paolo Angelelli --- .gitmodules | 2 +- src/3rdparty/mapbox-gl-native | 2 +- src/plugins/geoservices/mapboxgl/mapboxgl.pro | 5 +++++ src/plugins/geoservices/mapboxgl/qgeomapmapboxgl.cpp | 2 +- src/plugins/geoservices/mapboxgl/qsgmapboxglnode.cpp | 4 ++-- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.gitmodules b/.gitmodules index 22c3849d..a5343bfd 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ [submodule "src/3rdparty/mapbox-gl-native"] path = src/3rdparty/mapbox-gl-native url = ../qtlocation-mapboxgl.git - branch = upstream/qt-staging-5.11.0 + branch = upstream/qt-staging diff --git a/src/3rdparty/mapbox-gl-native b/src/3rdparty/mapbox-gl-native index 74df5203..b59b0450 160000 --- a/src/3rdparty/mapbox-gl-native +++ b/src/3rdparty/mapbox-gl-native @@ -1 +1 @@ -Subproject commit 74df5203628b47931b4edcb5e8fe352f40fe7df4 +Subproject commit b59b0450c60b3df9e0852f62f6c8a6024889cd9e 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(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/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(texture()); if (!fboTexture) { -- cgit v1.2.1