summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/3rdparty/icu_dependency.pri13
m---------src/3rdparty/mapbox-gl-native0
-rw-r--r--src/location/configure.json2
-rw-r--r--src/location/declarativemaps/qdeclarativepolygonmapitem.cpp1
-rw-r--r--src/location/doc/src/plugins/mapboxgl.qdoc8
-rw-r--r--src/plugins/geoservices/mapboxgl/mapboxgl.pro11
-rw-r--r--src/plugins/geoservices/mapboxgl/qmapboxglstylechange.cpp13
-rw-r--r--src/plugins/geoservices/mapboxgl/qsgmapboxglnode.cpp9
8 files changed, 26 insertions, 31 deletions
diff --git a/src/3rdparty/icu_dependency.pri b/src/3rdparty/icu_dependency.pri
deleted file mode 100644
index 6318631f..00000000
--- a/src/3rdparty/icu_dependency.pri
+++ /dev/null
@@ -1,13 +0,0 @@
-win32 {
- CONFIG(static, static|shared) {
- CONFIG(debug, debug|release) {
- LIBS_PRIVATE += -lsicuind -lsicuucd -lsicudtd
- } else {
- LIBS_PRIVATE += -lsicuin -lsicuuc -lsicudt
- }
- } else {
- LIBS_PRIVATE += -licuin -licuuc -licudt
- }
-} else {
- LIBS_PRIVATE += -licui18n -licuuc -licudata
-}
diff --git a/src/3rdparty/mapbox-gl-native b/src/3rdparty/mapbox-gl-native
-Subproject 1c633072fcea7ad153ab6f8ec40dd72d83541ea
+Subproject 572822c8ca15be190b43afbf7f91d132e988bf2
diff --git a/src/location/configure.json b/src/location/configure.json
index 3337b074..4de6e865 100644
--- a/src/location/configure.json
+++ b/src/location/configure.json
@@ -37,7 +37,7 @@
"condition": [
"features.opengl",
"features.c++14",
- "!config.qnx && (!config.win32 || (config.mingw && features.angle))"
+ "!config.qnx && (!config.win32 || config.mingw)"
],
"output": [ "privateFeature" ]
},
diff --git a/src/location/declarativemaps/qdeclarativepolygonmapitem.cpp b/src/location/declarativemaps/qdeclarativepolygonmapitem.cpp
index b481c64e..7460a376 100644
--- a/src/location/declarativemaps/qdeclarativepolygonmapitem.cpp
+++ b/src/location/declarativemaps/qdeclarativepolygonmapitem.cpp
@@ -374,6 +374,7 @@ void QDeclarativePolygonMapItem::setMap(QDeclarativeGeoMap *quickMap, QGeoMap *m
This property holds the ordered list of coordinates which
define the polygon.
+ Having less than 3 different coordinates in the path results in undefined behavior.
\sa addCoordinate, removeCoordinate
*/
diff --git a/src/location/doc/src/plugins/mapboxgl.qdoc b/src/location/doc/src/plugins/mapboxgl.qdoc
index 9099fb39..8ad6a9c2 100644
--- a/src/location/doc/src/plugins/mapboxgl.qdoc
+++ b/src/location/doc/src/plugins/mapboxgl.qdoc
@@ -60,7 +60,7 @@ and tiles hosted by Mapbox. To create a Mapbox account visit \l{https://www.mapb
Qt Location Mapbox GL Plugin has the following support for platforms:
\list
- \li Microsoft Windows (win32) - Supported, requires MinGW 5.0+ and ANGLE as OpenGL backend
+ \li Microsoft Windows (win32) - Supported, requires MinGW 5.0+
\li Linux X11 - Supported, requires GCC 4.9+
\li macOS - Supported
\li Android - Supported
@@ -109,6 +109,12 @@ The following table lists optional parameters that can be passed to the Mapbox p
but the offline database must be populated using the \l {https://github.com/mapbox/mapbox-gl-native/blob/master/bin/offline.cpp}
{offline tool}. The offline database will work alongside with the ambient cache in the same file.
Make sure to comply with Mapbox Terms of Service before creating an offline database.
+
+ \b {Note:} The map tile cache file name must be "mapboxgl.db". When using the offline tool, the default
+ output is "offline.db". For using the generated output from the offline tool, you must move that to the
+ proper directory, and rename it as "mapboxgl.db". The offline tool also provides the "--output"
+ parameter for specifying the name of the generated output.
+
\row
\li mapboxgl.mapping.cache.memory
\li Whether or not the cache should be in-memory only. Valid values are \b true and \b false. The default
diff --git a/src/plugins/geoservices/mapboxgl/mapboxgl.pro b/src/plugins/geoservices/mapboxgl/mapboxgl.pro
index f35f26dc..17b6f53a 100644
--- a/src/plugins/geoservices/mapboxgl/mapboxgl.pro
+++ b/src/plugins/geoservices/mapboxgl/mapboxgl.pro
@@ -35,16 +35,7 @@ load(qt_build_paths)
LIBS_PRIVATE += -L$$MODULE_BASE_OUTDIR/lib -lqmapboxgl$$qtPlatformTargetSuffix()
qtConfig(icu) {
- include(../../../3rdparty/icu_dependency.pri)
-}
-
-# When building for Windows with dynamic OpenGL, this plugin
-# can only run with ANGLE because Mapbox GL requires at least
-# OpenGL ES and does not use QOpenGLFunctions for resolving
-# the OpenGL symbols. -lopengl32 only gives OpenGL 1.1.
-win32:qtConfig(dynamicgl) {
- qtConfig(combined-angle-lib): LIBS_PRIVATE += -l$${LIBQTANGLE_NAME}
- else: LIBS_PRIVATE += -l$${LIBEGL_NAME} -l$${LIBGLESV2_NAME}
+ QMAKE_USE_PRIVATE += icu
}
PLUGIN_TYPE = geoservices
diff --git a/src/plugins/geoservices/mapboxgl/qmapboxglstylechange.cpp b/src/plugins/geoservices/mapboxgl/qmapboxglstylechange.cpp
index 69bb6e4b..f39bfae3 100644
--- a/src/plugins/geoservices/mapboxgl/qmapboxglstylechange.cpp
+++ b/src/plugins/geoservices/mapboxgl/qmapboxglstylechange.cpp
@@ -124,7 +124,10 @@ QMapbox::Feature featureFromMapPolygon(QDeclarativePolygonMapItem *mapItem)
coordinates << QMapbox::Coordinate { coordinate.latitude(), coordinate.longitude() };
}
}
- coordinates.append(coordinates.first());
+
+ if (!coordinates.empty())
+ coordinates.append(coordinates.first()); // closing the path
+
QMapbox::CoordinatesCollections geometry { { coordinates } };
return QMapbox::Feature(QMapbox::Feature::PolygonType, geometry, {}, getId(mapItem));
@@ -381,7 +384,7 @@ QList<QSharedPointer<QMapboxGLStyleChange>> QMapboxGLStyleSetPaintProperty::from
const QString id = getId(item);
changes << QSharedPointer<QMapboxGLStyleChange>(
- new QMapboxGLStyleSetPaintProperty(id, QStringLiteral("fill-opacity"), item->mapItemOpacity()));
+ new QMapboxGLStyleSetPaintProperty(id, QStringLiteral("fill-opacity"), item->color().alphaF() * item->mapItemOpacity()));
changes << QSharedPointer<QMapboxGLStyleChange>(
new QMapboxGLStyleSetPaintProperty(id, QStringLiteral("fill-color"), item->color()));
changes << QSharedPointer<QMapboxGLStyleChange>(
@@ -398,7 +401,7 @@ QList<QSharedPointer<QMapboxGLStyleChange>> QMapboxGLStyleSetPaintProperty::from
const QString id = getId(item);
changes << QSharedPointer<QMapboxGLStyleChange>(
- new QMapboxGLStyleSetPaintProperty(id, QStringLiteral("fill-opacity"), item->mapItemOpacity()));
+ new QMapboxGLStyleSetPaintProperty(id, QStringLiteral("fill-opacity"), item->color().alphaF() * item->mapItemOpacity()));
changes << QSharedPointer<QMapboxGLStyleChange>(
new QMapboxGLStyleSetPaintProperty(id, QStringLiteral("fill-color"), item->color()));
changes << QSharedPointer<QMapboxGLStyleChange>(
@@ -415,7 +418,7 @@ QList<QSharedPointer<QMapboxGLStyleChange>> QMapboxGLStyleSetPaintProperty::from
const QString id = getId(item);
changes << QSharedPointer<QMapboxGLStyleChange>(
- new QMapboxGLStyleSetPaintProperty(id, QStringLiteral("fill-opacity"), item->mapItemOpacity()));
+ new QMapboxGLStyleSetPaintProperty(id, QStringLiteral("fill-opacity"), item->color().alphaF() * item->mapItemOpacity()));
changes << QSharedPointer<QMapboxGLStyleChange>(
new QMapboxGLStyleSetPaintProperty(id, QStringLiteral("fill-color"), item->color()));
changes << QSharedPointer<QMapboxGLStyleChange>(
@@ -432,7 +435,7 @@ QList<QSharedPointer<QMapboxGLStyleChange>> QMapboxGLStyleSetPaintProperty::from
const QString id = getId(item);
changes << QSharedPointer<QMapboxGLStyleChange>(
- new QMapboxGLStyleSetPaintProperty(id, QStringLiteral("line-opacity"), item->mapItemOpacity()));
+ new QMapboxGLStyleSetPaintProperty(id, QStringLiteral("line-opacity"), item->line()->color().alphaF() * item->mapItemOpacity()));
changes << QSharedPointer<QMapboxGLStyleChange>(
new QMapboxGLStyleSetPaintProperty(id, QStringLiteral("line-color"), item->line()->color()));
changes << QSharedPointer<QMapboxGLStyleChange>(
diff --git a/src/plugins/geoservices/mapboxgl/qsgmapboxglnode.cpp b/src/plugins/geoservices/mapboxgl/qsgmapboxglnode.cpp
index 82aa868f..7721fe61 100644
--- a/src/plugins/geoservices/mapboxgl/qsgmapboxglnode.cpp
+++ b/src/plugins/geoservices/mapboxgl/qsgmapboxglnode.cpp
@@ -68,8 +68,10 @@ void QSGMapboxGLTextureNode::resize(const QSize &size, qreal pixelRatio)
m_map->setFramebufferObject(m_fbo->handle());
QSGPlainTexture *fboTexture = static_cast<QSGPlainTexture *>(texture());
- if (!fboTexture)
+ if (!fboTexture) {
fboTexture = new QSGPlainTexture;
+ fboTexture->setHasAlphaChannel(true);
+ }
fboTexture->setTextureId(m_fbo->texture());
fboTexture->setTextureSize(fbSize);
@@ -92,6 +94,11 @@ void QSGMapboxGLTextureNode::render(QQuickWindow *window)
f->glGetIntegerv(GL_UNPACK_ALIGNMENT, &alignment);
m_fbo->bind();
+
+ f->glClearColor(0.f, 0.f, 0.f, 0.f);
+ f->glColorMask(true, true, true, true);
+ f->glClear(GL_COLOR_BUFFER_BIT);
+
m_map->render();
m_fbo->release();