[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:
John Firebaugh
2016-08-29 12:00:08 -07:00
parent 3a48c60813
commit fe2a26225f
33 changed files with 426 additions and 148 deletions

View File

@@ -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();