summaryrefslogtreecommitdiff
path: root/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/expressions/Expression.java
diff options
context:
space:
mode:
Diffstat (limited to 'platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/expressions/Expression.java')
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/expressions/Expression.java32
1 files changed, 28 insertions, 4 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/expressions/Expression.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/expressions/Expression.java
index 25ff819470..c3451845dd 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/expressions/Expression.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/expressions/Expression.java
@@ -2843,7 +2843,8 @@ public class Expression {
* CircleLayer circleLayer = new CircleLayer("layer-id", "source-id");
* circleLayer.setProperties(
* circleColor(switchCase(
- * eq(literal("it"), resolvedLocale(collator(true, true, Locale.ITALY))), literal(ColorUtils.colorToRgbaString(Color.GREEN)),
+ * eq(literal("it"), resolvedLocale(collator(true, true, Locale.ITALY))), literal(ColorUtils.colorToRgbaString
+ * (Color.GREEN)),
* literal(ColorUtils.colorToRgbaString(Color.RED))))
* );
* }
@@ -3626,7 +3627,8 @@ public class Expression {
* @return expression
* @see <a href="https://www.mapbox.com/mapbox-gl-js/style-spec/#expressions-step">Style specification</a>
*/
- public static Expression step(@NonNull Expression input, @NonNull Expression defaultOutput, @NonNull Expression... stops) {
+ public static Expression step(@NonNull Expression input, @NonNull Expression defaultOutput,
+ @NonNull Expression... stops) {
return new Expression("step", join(new Expression[] {input, defaultOutput}, stops));
}
@@ -4411,7 +4413,7 @@ public class Expression {
/**
* If set, the text-font argument overrides the font specified by the root layout properties.
* <p>
- * "text-font" is required to a literal array.
+ * "text-font" is required to be a literal array.
* <p>
* The requested font stack has to be a part of the used style.
* For more information see <a href="https://www.mapbox.com/help/define-font-stack/">the documentation</a>.
@@ -4427,7 +4429,7 @@ public class Expression {
/**
* If set, the text-font argument overrides the font specified by the root layout properties.
* <p>
- * "text-font" is required to a literal array.
+ * "text-font" is required to be a literal array.
* <p>
* The requested font stack has to be a part of the used style.
* For more information see <a href="https://www.mapbox.com/help/define-font-stack/">the documentation</a>.
@@ -4439,6 +4441,28 @@ public class Expression {
public static FormatOption formatTextFont(@NonNull String[] fontStack) {
return new FormatOption("text-font", literal(fontStack));
}
+
+ /**
+ * If set, the text-color argument overrides the color specified by the root paint properties.
+ *
+ * @param expression expression
+ * @return format option
+ */
+ @NonNull
+ public static FormatOption formatTextColor(@NonNull Expression expression) {
+ return new FormatOption("text-color", expression);
+ }
+
+ /**
+ * If set, the text-color argument overrides the color specified by the root paint properties.
+ *
+ * @param color value
+ * @return format option
+ */
+ @NonNull
+ public static FormatOption formatTextColor(@ColorInt int color) {
+ return new FormatOption("text-color", color(color));
+ }
}
/**