fix: bridge Android particle mix property
Some checks failed
validate-scripts / validate-scripts (push) Has been cancelled

This commit is contained in:
OpenAI Codex
2026-09-03 10:35:17 +08:00
parent 0ab94c4eab
commit 5782574c8c
11 changed files with 68 additions and 6 deletions

View File

@@ -286,6 +286,11 @@ public final class MapLibreMap {
return nativeMapView.getNativePtr();
}
/** Updates a constant property on an existing Core style layer without requiring a Java Layer peer. */
public boolean setStyleLayerFloatProperty(String layerId, String propertyName, float value) {
return nativeMapView.setStyleLayerFloatProperty(layerId, propertyName, value);
}
// Style
/**

View File

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

View File

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