diff --git a/src/3rdparty/mapbox-gl-native b/src/3rdparty/mapbox-gl-native
index 9ecbe3642fb4a53b558598239b59bf1d0224c25b..c53896caefc96a8c18ab746026330ddc4fc0338e 160000
--- a/src/3rdparty/mapbox-gl-native
+++ b/src/3rdparty/mapbox-gl-native
@@ -1 +1 @@
-Subproject commit 9ecbe3642fb4a53b558598239b59bf1d0224c25b
+Subproject commit c53896caefc96a8c18ab746026330ddc4fc0338e
diff --git a/src/plugins/geoservices/geoservices.pro b/src/plugins/geoservices/geoservices.pro
index 459897a8bb2648fcb1355ddffd0b4ed9b41c525f..07c34798c1d925c3ca9aa19104510d4f2fc93a14 100644
--- a/src/plugins/geoservices/geoservices.pro
+++ b/src/plugins/geoservices/geoservices.pro
@@ -7,7 +7,7 @@ qtConfig(concurrent) {
 }
 
 qtConfig(opengl):qtConfig(c++14):!win32|mingw:!qnx {
-    !exists(../../3rdparty/mapbox-gl-native/CMakeLists.txt) {
+    !exists(../../3rdparty/mapbox-gl-native/mapbox-gl-native.pro) {
         warning("Submodule mapbox-gl-native does not exist. Run 'git submodule update --init' on qtlocation.")
     } else {
         SUBDIRS += mapboxgl ../../3rdparty/mapbox-gl-native
diff --git a/src/plugins/geoservices/mapboxgl/qmapboxglstylechange.cpp b/src/plugins/geoservices/mapboxgl/qmapboxglstylechange.cpp
index c6972b07402bd955560559648f0a580f451dd481..f79f0a388847a5083cae49808425a93205db02f5 100644
--- a/src/plugins/geoservices/mapboxgl/qmapboxglstylechange.cpp
+++ b/src/plugins/geoservices/mapboxgl/qmapboxglstylechange.cpp
@@ -54,7 +54,7 @@ QString formatPropertyName(QString *name)
 
 bool isImmutableProperty(const QString &name)
 {
-    return name == QStringLiteral("type") || name == QStringLiteral("layer") || name == QStringLiteral("class");
+    return name == QStringLiteral("type") || name == QStringLiteral("layer");
 }
 
 QString getId(QDeclarativeGeoMapItemBase *mapItem)
@@ -288,7 +288,7 @@ QMapboxGLStyleSetPaintProperty::QMapboxGLStyleSetPaintProperty(const QString& la
 
 void QMapboxGLStyleSetPaintProperty::apply(QMapboxGL *map)
 {
-    map->setPaintProperty(m_layer, m_property, m_value, m_class);
+    map->setPaintProperty(m_layer, m_property, m_value);
 }
 
 QList<QSharedPointer<QMapboxGLStyleChange>> QMapboxGLStyleSetPaintProperty::fromMapParameter(QGeoMapParameter *param)
@@ -313,7 +313,6 @@ QList<QSharedPointer<QMapboxGLStyleChange>> QMapboxGLStyleSetPaintProperty::from
 
         paint->m_layer = param->property("layer").toString();
         paint->m_property = formatPropertyName(&name);
-        paint->m_class = param->property("class").toString();
 
         changes << QSharedPointer<QMapboxGLStyleChange>(paint);
     }
@@ -399,15 +398,30 @@ QSharedPointer<QMapboxGLStyleChange> QMapboxGLStyleAddLayer::fromMapParameter(QG
     Q_ASSERT(param->type() == "layer");
 
     auto layer = new QMapboxGLStyleAddLayer();
-    layer->m_params[QStringLiteral("id")] = param->property("name");
-    layer->m_params[QStringLiteral("source")] = param->property("source");
-    layer->m_params[QStringLiteral("type")] = param->property("layerType");
 
-    if (param->property("sourceLayer").isValid()) {
-        layer->m_params[QStringLiteral("source-layer")] = param->property("sourceLayer");
-    }
+    static const QStringList layerProperties = QStringList()
+        << QStringLiteral("name") << QStringLiteral("layerType") << QStringLiteral("before");
 
-    layer->m_before = param->property("before").toString();
+    // Offset objectName and type properties.
+    for (int i = 2; i < param->metaObject()->propertyCount(); ++i) {
+        QString name = param->metaObject()->property(i).name();
+        QVariant value = param->property(name.toLatin1());
+
+        switch (layerProperties.indexOf(name)) {
+        case -1:
+            layer->m_params[formatPropertyName(&name)] = value;
+            break;
+        case 0: // name
+            layer->m_params[QStringLiteral("id")] = value;
+            break;
+        case 1: // layerType
+            layer->m_params[QStringLiteral("type")] = value;
+            break;
+        case 2: // before
+            layer->m_before = value.toString();
+            break;
+        }
+    }
 
     return QSharedPointer<QMapboxGLStyleChange>(layer);
 }
diff --git a/src/plugins/geoservices/mapboxgl/qmapboxglstylechange_p.h b/src/plugins/geoservices/mapboxgl/qmapboxglstylechange_p.h
index 9164591aec257ada0d4795d38d3b8302f95de320..aa81d89f00e78ec97b8aa7281b52f4e0052afa2d 100644
--- a/src/plugins/geoservices/mapboxgl/qmapboxglstylechange_p.h
+++ b/src/plugins/geoservices/mapboxgl/qmapboxglstylechange_p.h
@@ -102,7 +102,6 @@ private:
     QString m_layer;
     QString m_property;
     QVariant m_value;
-    QString m_class;
 };
 
 class QMapboxGLStyleAddLayer : public QMapboxGLStyleChange