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:
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user