[core, ios, android, qt] Observe style layer mutations rather than requiring SDKs to use Map::update
This paves the way for updates to filter and layout properties to trigger a source reload, without each SDK having to participate in the implementation.
This commit is contained in:
@@ -24,18 +24,14 @@ public abstract class Layer {
|
||||
return;
|
||||
}
|
||||
|
||||
boolean updateClasses = false;
|
||||
for (Property<?> property : properties) {
|
||||
Object converted = convertValue(property.value);
|
||||
if (property instanceof PaintProperty) {
|
||||
updateClasses = true;
|
||||
nativeSetPaintProperty(property.name, converted);
|
||||
} else {
|
||||
nativeSetLayoutProperty(property.name, converted);
|
||||
}
|
||||
}
|
||||
|
||||
nativeUpdateStyle(updateClasses);
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
@@ -83,8 +79,6 @@ public abstract class Layer {
|
||||
|
||||
protected native void nativeSetSourceLayer(String sourceLayer);
|
||||
|
||||
protected native void nativeUpdateStyle(boolean updateClasses);
|
||||
|
||||
protected native float nativeGetMinZoom();
|
||||
|
||||
protected native float nativeGetMaxZoom();
|
||||
|
||||
Reference in New Issue
Block a user