summaryrefslogtreecommitdiff
path: root/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/PropertyFactory.java
diff options
context:
space:
mode:
authorAnand Thakker <anandthakker@users.noreply.github.com>2017-02-17 16:16:25 -0500
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-02-17 13:16:25 -0800
commit062b18374d580f3522f577c4dccbfcd15e260e80 (patch)
tree357406a6090d755b33b46534e44b9f47fb040360 /platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/PropertyFactory.java
parentd4c569a0187d98bca6b71671fa5daf6ee09747da (diff)
downloadqtlocation-mapboxgl-062b18374d580f3522f577c4dccbfcd15e260e80.tar.gz
[core] Enable property functions for text-{field,transform} (#7944)
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.java16
1 files changed, 8 insertions, 8 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 1d14ece01b..61944c961e 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
@@ -1742,7 +1742,7 @@ public class PropertyFactory {
}
/**
- * Value to use for a text label. Feature properties are specified using tokens like {field_name}.
+ * Value to use for a text label. Feature properties are specified using tokens like {field_name}. (Token replacement is only supported for literal `textField` values--not for property functions.)
*
* @param value a String value
* @return property wrapper around String
@@ -1754,13 +1754,13 @@ public class PropertyFactory {
/**
- * Value to use for a text label. Feature properties are specified using tokens like {field_name}.
+ * Value to use for a text label. Feature properties are specified using tokens like {field_name}. (Token replacement is only supported for literal `textField` values--not for property functions.)
*
- * @param <Z> the zoom parameter type
- * @param function a wrapper {@link CameraFunction} for String
+ * @param <T> the function input type
+ * @param function a wrapper function for String
* @return property wrapper around a String function
*/
- public static <Z extends Number> PropertyValue<CameraFunction<Z, String>> textField(CameraFunction<Z, String> function) {
+ public static <T> PropertyValue<Function<T, String>> textField(Function<T, String> function) {
return new LayoutPropertyValue<>("text-field", function);
}
@@ -2032,11 +2032,11 @@ public class PropertyFactory {
/**
* Specifies how to capitalize text, similar to the CSS {@link PropertyFactory#textTransform} property.
*
- * @param <Z> the zoom parameter type
- * @param function a wrapper {@link CameraFunction} for String
+ * @param <T> the function input type
+ * @param function a wrapper function for String
* @return property wrapper around a String function
*/
- public static <Z extends Number> PropertyValue<CameraFunction<Z, String>> textTransform(CameraFunction<Z, String> function) {
+ public static <T> PropertyValue<Function<T, String>> textTransform(Function<T, String> function) {
return new LayoutPropertyValue<>("text-transform", function);
}