summaryrefslogtreecommitdiff
path: root/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk
diff options
context:
space:
mode:
Diffstat (limited to 'platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk')
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/Property.java21
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/PropertyFactory.java20
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/SymbolLayer.java16
3 files changed, 57 insertions, 0 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/Property.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/Property.java
index 8ffcf6ddb8..52ed6c23ae 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/Property.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/Property.java
@@ -669,6 +669,27 @@ public final class Property {
@Retention(RetentionPolicy.SOURCE)
public @interface ANCHOR {}
+ // TEXT_WRITING_MODE: The property allows control over a symbol's orientation. Note that the property values act as a hint, so that a symbol whose language doesn’t support the provided orientation will be laid out in its natural orientation. Example: English point symbol will be rendered horizontally even if array value contains single 'vertical' enum value. The order of elements in an array define priority order for the placement of an orientation variant.
+
+ /**
+ * If a text's language supports horizontal writing mode, symbols with point placement would be laid out horizontally.
+ */
+ public static final String TEXT_WRITING_MODE_HORIZONTAL = "horizontal";
+ /**
+ * If a text's language supports vertical writing mode, symbols with point placement would be laid out vertically.
+ */
+ public static final String TEXT_WRITING_MODE_VERTICAL = "vertical";
+
+ /**
+ * The property allows control over a symbol's orientation. Note that the property values act as a hint, so that a symbol whose language doesn’t support the provided orientation will be laid out in its natural orientation. Example: English point symbol will be rendered horizontally even if array value contains single 'vertical' enum value. The order of elements in an array define priority order for the placement of an orientation variant.
+ */
+ @StringDef({
+ TEXT_WRITING_MODE_HORIZONTAL,
+ TEXT_WRITING_MODE_VERTICAL,
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface TEXT_WRITING_MODE {}
+
private Property() {
}
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 3f2771a307..82085b171c 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
@@ -2376,6 +2376,26 @@ public class PropertyFactory {
}
/**
+ * The property allows control over a symbol's orientation. Note that the property values act as a hint, so that a symbol whose language doesn’t support the provided orientation will be laid out in its natural orientation. Example: English point symbol will be rendered horizontally even if array value contains single 'vertical' enum value. The order of elements in an array define priority order for the placement of an orientation variant.
+ *
+ * @param value a String[] value
+ * @return property wrapper around String[]
+ */
+ public static PropertyValue<String[]> textWritingMode(String[] value) {
+ return new LayoutPropertyValue<>("text-writing-mode", value);
+ }
+
+ /**
+ * The property allows control over a symbol's orientation. Note that the property values act as a hint, so that a symbol whose language doesn’t support the provided orientation will be laid out in its natural orientation. Example: English point symbol will be rendered horizontally even if array value contains single 'vertical' enum value. The order of elements in an array define priority order for the placement of an orientation variant.
+ *
+ * @param value a String[] value
+ * @return property wrapper around String[]
+ */
+ public static PropertyValue<Expression> textWritingMode(Expression value) {
+ return new LayoutPropertyValue<>("text-writing-mode", value);
+ }
+
+ /**
* Rotates the text clockwise.
*
* @param value a Float value
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/SymbolLayer.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/SymbolLayer.java
index 1d8bad7e8e..5ab47def4e 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/SymbolLayer.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/SymbolLayer.java
@@ -530,6 +530,18 @@ public class SymbolLayer extends Layer {
}
/**
+ * Get the TextWritingMode property
+ *
+ * @return property wrapper value around String[]
+ */
+ @NonNull
+ @SuppressWarnings("unchecked")
+ public PropertyValue<String[]> getTextWritingMode() {
+ checkThread();
+ return (PropertyValue<String[]>) new PropertyValue("text-writing-mode", nativeGetTextWritingMode());
+ }
+
+ /**
* Get the TextRotate property
*
* @return property wrapper value around Float
@@ -1243,6 +1255,10 @@ public class SymbolLayer extends Layer {
@NonNull
@Keep
+ private native Object nativeGetTextWritingMode();
+
+ @NonNull
+ @Keep
private native Object nativeGetTextRotate();
@NonNull