summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/plugins/geoservices/mapboxgl/qgeomapmapboxgl.cpp6
-rw-r--r--src/plugins/geoservices/mapboxgl/qmapboxglstylechange.cpp3
2 files changed, 5 insertions, 4 deletions
diff --git a/src/plugins/geoservices/mapboxgl/qgeomapmapboxgl.cpp b/src/plugins/geoservices/mapboxgl/qgeomapmapboxgl.cpp
index 82378f0a..3b9026ce 100644
--- a/src/plugins/geoservices/mapboxgl/qgeomapmapboxgl.cpp
+++ b/src/plugins/geoservices/mapboxgl/qgeomapmapboxgl.cpp
@@ -364,11 +364,11 @@ void QGeoMapMapboxGL::onMapChanged(QMapboxGL::MapChange change)
d->m_styleLoaded = false;
d->m_styleChanges.clear();
- for (QGeoMapParameter *param : d->m_mapParameters)
- d->m_styleChanges << QMapboxGLStyleChange::addMapParameter(param);
-
for (QDeclarativeGeoMapItemBase *item : d->m_mapItems)
d->m_styleChanges << QMapboxGLStyleChange::addMapItem(item, d->m_mapItemsBefore);
+
+ for (QGeoMapParameter *param : d->m_mapParameters)
+ d->m_styleChanges << QMapboxGLStyleChange::addMapParameter(param);
}
}
diff --git a/src/plugins/geoservices/mapboxgl/qmapboxglstylechange.cpp b/src/plugins/geoservices/mapboxgl/qmapboxglstylechange.cpp
index 8229b784..c6972b07 100644
--- a/src/plugins/geoservices/mapboxgl/qmapboxglstylechange.cpp
+++ b/src/plugins/geoservices/mapboxgl/qmapboxglstylechange.cpp
@@ -59,7 +59,8 @@ bool isImmutableProperty(const QString &name)
QString getId(QDeclarativeGeoMapItemBase *mapItem)
{
- return QStringLiteral("QDeclarativeGeoMapItemBase-") + QString::number(quint64(mapItem));
+ return QStringLiteral("QtLocation-") +
+ ((mapItem->objectName().isEmpty()) ? QString::number(quint64(mapItem)) : mapItem->objectName());
}
// Mapbox GL supports geometry segments that spans above 180 degrees in