diff options
author | Łukasz Paczos <lukas.paczos@gmail.com> | 2018-11-07 17:17:26 +0100 |
---|---|---|
committer | Łukasz Paczos <lukasz.paczos@mapbox.com> | 2018-11-20 12:22:16 +0100 |
commit | 9ac444a08d9701dc7b0da41859842a77d7be8e00 (patch) | |
tree | 08ab99d6caa7a24a9106382eedcc5812bf2c1811 /platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/SymbolLayer.java | |
parent | 1d73bda00d1e4c18ef32eac5053afa4cc9bc4b0a (diff) | |
download | qtlocation-mapboxgl-9ac444a08d9701dc7b0da41859842a77d7be8e00.tar.gz |
[android] removing plain text getter for "text-field"
Diffstat (limited to 'platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/SymbolLayer.java')
-rw-r--r-- | platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/SymbolLayer.java | 34 |
1 files changed, 2 insertions, 32 deletions
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 25c0a2bb32..ab45cb04f2 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 @@ -388,41 +388,11 @@ public class SymbolLayer extends Layer { /** * Get the TextField property * - * @return property wrapper value around String - */ - @NonNull - @SuppressWarnings("unchecked") - public PropertyValue<String> getTextField() { - checkThread(); - - PropertyValue propertyValue = new PropertyValue<>("text-field", nativeGetTextField()); - if (propertyValue.isExpression()) { - return (PropertyValue<String>) propertyValue; - } else { - String text = null; - - Formatted formatted = (Formatted) nativeGetTextField(); - if (formatted != null) { - StringBuilder builder = new StringBuilder(); - for (FormattedSection section : formatted.getFormattedSections()) { - builder.append(section.getText()); - } - text = builder.toString(); - } - - return (PropertyValue<String>) new PropertyValue("text-field", text); - } - } - - /** - * Get the TextField property as {@link Formatted} object - * - * @return property wrapper value around String - * @see Expression#format(Expression.FormatEntry...) + * @return property wrapper value around Formatted */ @NonNull @SuppressWarnings("unchecked") - public PropertyValue<Formatted> getFormattedTextField() { + public PropertyValue<Formatted> getTextField() { checkThread(); return (PropertyValue<Formatted>) new PropertyValue("text-field", nativeGetTextField()); } |