diff options
Diffstat (limited to 'platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/PropertyFactory.java')
-rw-r--r-- | platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/PropertyFactory.java | 164 |
1 files changed, 164 insertions, 0 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/PropertyFactory.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/PropertyFactory.java index e37245000e..e4ea9676fa 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/PropertyFactory.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/PropertyFactory.java @@ -1029,6 +1029,170 @@ public class PropertyFactory { } /** + * The opacity of the entire fill extrusion layer. This is rendered on a per-layer, not per-feature, basis, and data-driven styling is not available. + * + * @param value a Float value + * @return property wrapper around Float + */ + public static PropertyValue<Float> fillExtrusionOpacity(Float value) { + return new PaintPropertyValue<>("fill-extrusion-opacity", value); + } + + + /** + * The opacity of the entire fill extrusion layer. This is rendered on a per-layer, not per-feature, basis, and data-driven styling is not available. + * + * @param <Z> the zoom parameter type + * @param function a wrapper {@link CameraFunction} for Float + * @return property wrapper around a Float function + */ + public static <Z extends Number> PropertyValue<CameraFunction<Z, Float>> fillExtrusionOpacity(CameraFunction<Z, Float> function) { + return new PaintPropertyValue<>("fill-extrusion-opacity", function); + } + + /** + * The base color of the extruded fill. The extrusion's surfaces will be shaded differently based on this color in combination with the root `light` settings. If this color is specified as `rgba` with an alpha component, the alpha component will be ignored; use {@link PropertyFactory#fillExtrusionOpacity} to set layer opacity. + * + * @param value a int color value + * @return property wrapper around String color + */ + public static PropertyValue<String> fillExtrusionColor(@ColorInt int value) { + return new PaintPropertyValue<>("fill-extrusion-color", colorToRgbaString(value)); + } + + /** + * The base color of the extruded fill. The extrusion's surfaces will be shaded differently based on this color in combination with the root `light` settings. If this color is specified as `rgba` with an alpha component, the alpha component will be ignored; use {@link PropertyFactory#fillExtrusionOpacity} to set layer opacity. + * + * @param value a String value + * @return property wrapper around String + */ + public static PropertyValue<String> fillExtrusionColor(String value) { + return new PaintPropertyValue<>("fill-extrusion-color", value); + } + + + /** + * The base color of the extruded fill. The extrusion's surfaces will be shaded differently based on this color in combination with the root `light` settings. If this color is specified as `rgba` with an alpha component, the alpha component will be ignored; use {@link PropertyFactory#fillExtrusionOpacity} to set layer opacity. + * + * @param <T> the function input type + * @param function a wrapper function for String + * @return property wrapper around a String function + */ + public static <T> PropertyValue<Function<T, String>> fillExtrusionColor(Function<T, String> function) { + return new PaintPropertyValue<>("fill-extrusion-color", function); + } + + /** + * The geometry's offset. Values are [x, y] where negatives indicate left and up (on the flat plane), respectively. + * + * @param value a Float[] value + * @return property wrapper around Float[] + */ + public static PropertyValue<Float[]> fillExtrusionTranslate(Float[] value) { + return new PaintPropertyValue<>("fill-extrusion-translate", value); + } + + + /** + * The geometry's offset. Values are [x, y] where negatives indicate left and up (on the flat plane), respectively. + * + * @param <Z> the zoom parameter type + * @param function a wrapper {@link CameraFunction} for Float[] + * @return property wrapper around a Float[] function + */ + public static <Z extends Number> PropertyValue<CameraFunction<Z, Float[]>> fillExtrusionTranslate(CameraFunction<Z, Float[]> function) { + return new PaintPropertyValue<>("fill-extrusion-translate", function); + } + + /** + * Controls the translation reference point. + * + * @param value a String value + * @return property wrapper around String + */ + public static PropertyValue<String> fillExtrusionTranslateAnchor(@Property.FILL_EXTRUSION_TRANSLATE_ANCHOR String value) { + return new PaintPropertyValue<>("fill-extrusion-translate-anchor", value); + } + + + /** + * Controls the translation reference point. + * + * @param <Z> the zoom parameter type + * @param function a wrapper {@link CameraFunction} for String + * @return property wrapper around a String function + */ + public static <Z extends Number> PropertyValue<CameraFunction<Z, String>> fillExtrusionTranslateAnchor(CameraFunction<Z, String> function) { + return new PaintPropertyValue<>("fill-extrusion-translate-anchor", function); + } + + /** + * Name of image in sprite to use for drawing images on extruded fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). + * + * @param value a String value + * @return property wrapper around String + */ + public static PropertyValue<String> fillExtrusionPattern(String value) { + return new PaintPropertyValue<>("fill-extrusion-pattern", value); + } + + + /** + * Name of image in sprite to use for drawing images on extruded fills. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). + * + * @param <Z> the zoom parameter type + * @param function a wrapper {@link CameraFunction} for String + * @return property wrapper around a String function + */ + public static <Z extends Number> PropertyValue<CameraFunction<Z, String>> fillExtrusionPattern(CameraFunction<Z, String> function) { + return new PaintPropertyValue<>("fill-extrusion-pattern", function); + } + + /** + * The height with which to extrude this layer. + * + * @param value a Float value + * @return property wrapper around Float + */ + public static PropertyValue<Float> fillExtrusionHeight(Float value) { + return new PaintPropertyValue<>("fill-extrusion-height", value); + } + + + /** + * The height with which to extrude this layer. + * + * @param <T> the function input type + * @param function a wrapper function for Float + * @return property wrapper around a Float function + */ + public static <T> PropertyValue<Function<T, Float>> fillExtrusionHeight(Function<T, Float> function) { + return new PaintPropertyValue<>("fill-extrusion-height", function); + } + + /** + * The height with which to extrude the base of this layer. Must be less than or equal to {@link PropertyFactory#fillExtrusionHeight}. + * + * @param value a Float value + * @return property wrapper around Float + */ + public static PropertyValue<Float> fillExtrusionBase(Float value) { + return new PaintPropertyValue<>("fill-extrusion-base", value); + } + + + /** + * The height with which to extrude the base of this layer. Must be less than or equal to {@link PropertyFactory#fillExtrusionHeight}. + * + * @param <T> the function input type + * @param function a wrapper function for Float + * @return property wrapper around a Float function + */ + public static <T> PropertyValue<Function<T, Float>> fillExtrusionBase(Function<T, Float> function) { + return new PaintPropertyValue<>("fill-extrusion-base", function); + } + + /** * The opacity at which the image will be drawn. * * @param value a Float value |