[Qt] Use QVariantMap in QQuickMapboxGLStyleProperty
This commit is contained in:
@@ -156,7 +156,12 @@ void QQuickMapboxGL::setColor(const QColor &color)
|
||||
|
||||
m_color = color;
|
||||
|
||||
setPaintProperty("background", "background-color", color);
|
||||
QVariantMap paintProperty;
|
||||
paintProperty["type"] = QQuickMapboxGLLayoutStyleProperty::PaintType;
|
||||
paintProperty["layer"] = "background";
|
||||
paintProperty["property"] = "background-color";
|
||||
paintProperty["value"] = color;
|
||||
onStylePropertyUpdated(paintProperty);
|
||||
|
||||
emit colorChanged(m_color);
|
||||
}
|
||||
@@ -174,18 +179,6 @@ void QQuickMapboxGL::pan(int dx, int dy)
|
||||
update();
|
||||
}
|
||||
|
||||
void QQuickMapboxGL::setLayoutProperty(const QString &layer, const QString &property, const QVariant &value)
|
||||
{
|
||||
m_layoutChanges.append(LayoutPropertyChange { layer, property, value });
|
||||
update();
|
||||
}
|
||||
|
||||
void QQuickMapboxGL::setPaintProperty(const QString &layer, const QString &property, const QVariant &value, const QString &klass)
|
||||
{
|
||||
m_paintChanges.append(PaintPropertyChange { layer, property, value, klass });
|
||||
update();
|
||||
}
|
||||
|
||||
void QQuickMapboxGL::setStyle(const QString &styleUrl)
|
||||
{
|
||||
if (m_style == styleUrl) {
|
||||
|
||||
Reference in New Issue
Block a user