[Qt] Added QQuickMapboxGLStyle
A QQuickMapboxGLStyleProperty being a child of QQuickMapboxGLStyle assures that only properties associated with that particular style will reflect on the map - and that happens only when the style is the current set via style property.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
#include <QMapboxGL>
|
||||
#include <QQuickMapboxGL>
|
||||
#include <QQuickMapboxGLStyle>
|
||||
|
||||
#include <QSize>
|
||||
#include <QOpenGLFramebufferObject>
|
||||
@@ -83,8 +84,8 @@ void QQuickMapboxGLRenderer::synchronize(QQuickFramebufferObject *item)
|
||||
m_map->setCoordinateZoom({ center.latitude(), center.longitude() }, quickMap->zoomLevel());
|
||||
}
|
||||
|
||||
if (syncStatus & QQuickMapboxGL::StyleNeedsSync) {
|
||||
m_map->setStyleURL(quickMap->style());
|
||||
if (syncStatus & QQuickMapboxGL::StyleNeedsSync && quickMap->style()) {
|
||||
m_map->setStyleURL(quickMap->style()->url());
|
||||
m_styleLoaded = false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user