feat: add runtime particle field updates

This commit is contained in:
OpenAI Codex
2026-09-03 18:26:13 +08:00
parent 7af12e7d62
commit 45502a53f4
12 changed files with 346 additions and 15 deletions

View File

@@ -291,6 +291,11 @@ public final class MapLibreMap {
return nativeMapView.setStyleLayerFloatProperty(layerId, propertyName, value);
}
/** Advances a Source-owned raster-array runtime Field window without reloading the Style. */
public boolean advanceRasterArraySourceFieldWindow(String sourceId) {
return nativeMapView.advanceRasterArraySourceFieldWindow(sourceId);
}
// Style
/**

View File

@@ -141,6 +141,8 @@ interface NativeMap {
boolean setStyleLayerFloatProperty(String layerId, String propertyName, float value);
boolean advanceRasterArraySourceFieldWindow(String sourceId);
boolean removeLayer(@NonNull String layerId);
boolean removeLayer(@NonNull Layer layer);

View File

@@ -956,6 +956,12 @@ final class NativeMapView implements NativeMap {
&& nativeSetStyleLayerFloatProperty(layerId, propertyName, value);
}
@Override
public boolean advanceRasterArraySourceFieldWindow(String sourceId) {
return !checkState("advanceRasterArraySourceFieldWindow")
&& nativeAdvanceRasterArraySourceFieldWindow(sourceId);
}
@Override
public void addLayer(@NonNull Layer layer) {
if (checkState("addLayer")) {
@@ -1690,6 +1696,9 @@ final class NativeMapView implements NativeMap {
@Keep
private native boolean nativeSetStyleLayerFloatProperty(String layerId, String propertyName, float value);
@Keep
private native boolean nativeAdvanceRasterArraySourceFieldWindow(String sourceId);
@Keep
private native void nativeAddLayer(long layerPtr, String before) throws CannotAddLayerException;