Add fill extrusion style property that enables rounded corners for extruded buildings (Core feature) (#4343)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Bart Louwers <bart@emeel.net>
This commit is contained in:
Alex Cristici
2026-07-21 17:56:36 +03:00
committed by GitHub
parent 7426c42e64
commit d866b289cc
31 changed files with 579 additions and 291 deletions

View File

@@ -143,6 +143,18 @@ public class FillExtrusionLayer extends Layer {
// Property getters
/**
* Get the FillExtrusionRoundedCornerDistance property
*
* @return property wrapper value around Float
*/
@NonNull
@SuppressWarnings("unchecked")
public PropertyValue<Float> getFillExtrusionRoundedCornerDistance() {
checkThread();
return (PropertyValue<Float>) new PropertyValue("fill-extrusion-rounded-corner-distance", nativeGetFillExtrusionRoundedCornerDistance());
}
/**
* Get the FillExtrusionOpacity property
*
@@ -382,6 +394,10 @@ public class FillExtrusionLayer extends Layer {
return (PropertyValue<Boolean>) new PropertyValue("fill-extrusion-vertical-gradient", nativeGetFillExtrusionVerticalGradient());
}
@NonNull
@Keep
private native Object nativeGetFillExtrusionRoundedCornerDistance();
@NonNull
@Keep
private native Object nativeGetFillExtrusionOpacity();

View File

@@ -2767,4 +2767,24 @@ The unit is in density-independent pixels only for SDF sprites that were created
return new LayoutPropertyValue<>("circle-sort-key", value);
}
/**
* The distance from the corner that will be cut and replaced with rounded corner.
*
* @param value a Float value
* @return property wrapper around Float
*/
public static PropertyValue<Float> fillExtrusionRoundedCornerDistance(Float value) {
return new LayoutPropertyValue<>("fill-extrusion-rounded-corner-distance", value);
}
/**
* The distance from the corner that will be cut and replaced with rounded corner.
*
* @param value a Float value
* @return property wrapper around Float
*/
public static PropertyValue<Expression> fillExtrusionRoundedCornerDistance(Expression value) {
return new LayoutPropertyValue<>("fill-extrusion-rounded-corner-distance", value);
}
}