summaryrefslogtreecommitdiff
path: root/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/SymbolLayer.java
diff options
context:
space:
mode:
authorTobrun <tobrun.van.nuland@gmail.com>2016-08-09 10:54:56 -0400
committerTobrun <tobrun.van.nuland@gmail.com>2016-08-09 20:48:00 -0400
commit532c659b22c73eac04c7d643aff6ac5f1cc9f55a (patch)
tree10727eaaab5bd41188580a227c6300936c250ebf /platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/SymbolLayer.java
parent78387e9167f1072265d6e06b4a4a423dfe405c4a (diff)
downloadqtlocation-mapboxgl-532c659b22c73eac04c7d643aff6ac5f1cc9f55a.tar.gz
[android] javadoc cleanup part 2
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.java331
1 files changed, 314 insertions, 17 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 a62b256638..d1f0ed0a6a 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
@@ -13,47 +13,96 @@ import static com.mapbox.mapboxsdk.utils.ColorUtils.*;
*/
public class SymbolLayer extends Layer {
+ /**
+ * Creates a SymbolLayer.
+ *
+ * @param nativePtr pointer used by core
+ */
public SymbolLayer(long nativePtr) {
super(nativePtr);
}
+ /**
+ * Creates a SymbolLayer.
+ *
+ * @param layerId the id of the layer
+ * @param sourceId the id of the source
+ */
public SymbolLayer(String layerId, String sourceId) {
initialize(layerId, sourceId);
}
protected native void initialize(String layerId, String sourceId);
+ /**
+ * Set the source layer.
+ *
+ * @param sourceLayer the source layer to set
+ */
public void setSourceLayer(String sourceLayer) {
checkValidity();
nativeSetSourceLayer(sourceLayer);
}
+ /**
+ * Set the source Layer.
+ *
+ * @param sourceLayer the source layer to set
+ * @return This
+ */
public SymbolLayer withSourceLayer(String sourceLayer) {
setSourceLayer(sourceLayer);
return this;
}
-
+ /**
+ * Set a single filter.
+ *
+ * @param filter the filter to set
+ */
public void setFilter(Filter.Statement filter) {
checkValidity();
this.setFilter(filter.toArray());
}
+ /**
+ * Set an array of filters.
+ *
+ * @param filter the filter array to set
+ */
public void setFilter(Object[] filter) {
checkValidity();
nativeSetFilter(filter);
}
+ /**
+ * Set an array of filters.
+ *
+ * @param filter tthe filter array to set
+ * @return This
+ */
public SymbolLayer withFilter(Object[] filter) {
setFilter(filter);
return this;
}
+ /**
+ * Set a single filter.
+ *
+ * @param filter the filter to set
+ * @return This
+ */
public SymbolLayer withFilter(Filter.Statement filter) {
setFilter(filter);
return this;
}
+ /**
+ * Set a property or properties.
+ *
+ * @param properties the var-args properties
+ * @return This
+ */
public SymbolLayer withProperties(@NonNull Property<?>... properties) {
setProperties(properties);
return this;
@@ -61,225 +110,407 @@ public class SymbolLayer extends Layer {
// Property getters
+ /**
+ * Get the SymbolPlacement property
+ *
+ * @return property wrapper value around String
+ */
@SuppressWarnings("unchecked")
public PropertyValue<String> getSymbolPlacement() {
checkValidity();
return (PropertyValue<String>) new PropertyValue(nativeGetSymbolPlacement());
}
+ /**
+ * Get the SymbolSpacing property
+ *
+ * @return property wrapper value around Float
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Float> getSymbolSpacing() {
checkValidity();
return (PropertyValue<Float>) new PropertyValue(nativeGetSymbolSpacing());
}
+ /**
+ * Get the SymbolAvoidEdges property
+ *
+ * @return property wrapper value around Boolean
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Boolean> getSymbolAvoidEdges() {
checkValidity();
return (PropertyValue<Boolean>) new PropertyValue(nativeGetSymbolAvoidEdges());
}
+ /**
+ * Get the IconAllowOverlap property
+ *
+ * @return property wrapper value around Boolean
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Boolean> getIconAllowOverlap() {
checkValidity();
return (PropertyValue<Boolean>) new PropertyValue(nativeGetIconAllowOverlap());
}
+ /**
+ * Get the IconIgnorePlacement property
+ *
+ * @return property wrapper value around Boolean
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Boolean> getIconIgnorePlacement() {
checkValidity();
return (PropertyValue<Boolean>) new PropertyValue(nativeGetIconIgnorePlacement());
}
+ /**
+ * Get the IconOptional property
+ *
+ * @return property wrapper value around Boolean
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Boolean> getIconOptional() {
checkValidity();
return (PropertyValue<Boolean>) new PropertyValue(nativeGetIconOptional());
}
+ /**
+ * Get the IconRotationAlignment property
+ *
+ * @return property wrapper value around String
+ */
@SuppressWarnings("unchecked")
public PropertyValue<String> getIconRotationAlignment() {
checkValidity();
return (PropertyValue<String>) new PropertyValue(nativeGetIconRotationAlignment());
}
+ /**
+ * Get the IconSize property
+ *
+ * @return property wrapper value around Float
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Float> getIconSize() {
checkValidity();
return (PropertyValue<Float>) new PropertyValue(nativeGetIconSize());
}
+ /**
+ * Get the IconTextFit property
+ *
+ * @return property wrapper value around String
+ */
@SuppressWarnings("unchecked")
public PropertyValue<String> getIconTextFit() {
checkValidity();
return (PropertyValue<String>) new PropertyValue(nativeGetIconTextFit());
}
+ /**
+ * Get the IconTextFitPadding property
+ *
+ * @return property wrapper value around Float[]
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Float[]> getIconTextFitPadding() {
checkValidity();
return (PropertyValue<Float[]>) new PropertyValue(nativeGetIconTextFitPadding());
}
+ /**
+ * Get the IconImage property
+ *
+ * @return property wrapper value around String
+ */
@SuppressWarnings("unchecked")
public PropertyValue<String> getIconImage() {
checkValidity();
return (PropertyValue<String>) new PropertyValue(nativeGetIconImage());
}
+ /**
+ * Get the IconRotate property
+ *
+ * @return property wrapper value around Float
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Float> getIconRotate() {
checkValidity();
return (PropertyValue<Float>) new PropertyValue(nativeGetIconRotate());
}
+ /**
+ * Get the IconPadding property
+ *
+ * @return property wrapper value around Float
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Float> getIconPadding() {
checkValidity();
return (PropertyValue<Float>) new PropertyValue(nativeGetIconPadding());
}
+ /**
+ * Get the IconKeepUpright property
+ *
+ * @return property wrapper value around Boolean
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Boolean> getIconKeepUpright() {
checkValidity();
return (PropertyValue<Boolean>) new PropertyValue(nativeGetIconKeepUpright());
}
+ /**
+ * Get the IconOffset property
+ *
+ * @return property wrapper value around Float[]
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Float[]> getIconOffset() {
checkValidity();
return (PropertyValue<Float[]>) new PropertyValue(nativeGetIconOffset());
}
+ /**
+ * Get the TextPitchAlignment property
+ *
+ * @return property wrapper value around String
+ */
@SuppressWarnings("unchecked")
public PropertyValue<String> getTextPitchAlignment() {
checkValidity();
return (PropertyValue<String>) new PropertyValue(nativeGetTextPitchAlignment());
}
+ /**
+ * Get the TextRotationAlignment property
+ *
+ * @return property wrapper value around String
+ */
@SuppressWarnings("unchecked")
public PropertyValue<String> getTextRotationAlignment() {
checkValidity();
return (PropertyValue<String>) new PropertyValue(nativeGetTextRotationAlignment());
}
+ /**
+ * Get the TextField property
+ *
+ * @return property wrapper value around String
+ */
@SuppressWarnings("unchecked")
public PropertyValue<String> getTextField() {
checkValidity();
return (PropertyValue<String>) new PropertyValue(nativeGetTextField());
}
+ /**
+ * Get the TextFont property
+ *
+ * @return property wrapper value around String[]
+ */
@SuppressWarnings("unchecked")
public PropertyValue<String[]> getTextFont() {
checkValidity();
return (PropertyValue<String[]>) new PropertyValue(nativeGetTextFont());
}
+ /**
+ * Get the TextSize property
+ *
+ * @return property wrapper value around Float
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Float> getTextSize() {
checkValidity();
return (PropertyValue<Float>) new PropertyValue(nativeGetTextSize());
}
+ /**
+ * Get the TextMaxWidth property
+ *
+ * @return property wrapper value around Float
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Float> getTextMaxWidth() {
checkValidity();
return (PropertyValue<Float>) new PropertyValue(nativeGetTextMaxWidth());
}
+ /**
+ * Get the TextLineHeight property
+ *
+ * @return property wrapper value around Float
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Float> getTextLineHeight() {
checkValidity();
return (PropertyValue<Float>) new PropertyValue(nativeGetTextLineHeight());
}
+ /**
+ * Get the TextLetterSpacing property
+ *
+ * @return property wrapper value around Float
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Float> getTextLetterSpacing() {
checkValidity();
return (PropertyValue<Float>) new PropertyValue(nativeGetTextLetterSpacing());
}
+ /**
+ * Get the TextJustify property
+ *
+ * @return property wrapper value around String
+ */
@SuppressWarnings("unchecked")
public PropertyValue<String> getTextJustify() {
checkValidity();
return (PropertyValue<String>) new PropertyValue(nativeGetTextJustify());
}
+ /**
+ * Get the TextAnchor property
+ *
+ * @return property wrapper value around String
+ */
@SuppressWarnings("unchecked")
public PropertyValue<String> getTextAnchor() {
checkValidity();
return (PropertyValue<String>) new PropertyValue(nativeGetTextAnchor());
}
+ /**
+ * Get the TextMaxAngle property
+ *
+ * @return property wrapper value around Float
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Float> getTextMaxAngle() {
checkValidity();
return (PropertyValue<Float>) new PropertyValue(nativeGetTextMaxAngle());
}
+ /**
+ * Get the TextRotate property
+ *
+ * @return property wrapper value around Float
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Float> getTextRotate() {
checkValidity();
return (PropertyValue<Float>) new PropertyValue(nativeGetTextRotate());
}
+ /**
+ * Get the TextPadding property
+ *
+ * @return property wrapper value around Float
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Float> getTextPadding() {
checkValidity();
return (PropertyValue<Float>) new PropertyValue(nativeGetTextPadding());
}
+ /**
+ * Get the TextKeepUpright property
+ *
+ * @return property wrapper value around Boolean
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Boolean> getTextKeepUpright() {
checkValidity();
return (PropertyValue<Boolean>) new PropertyValue(nativeGetTextKeepUpright());
}
+ /**
+ * Get the TextTransform property
+ *
+ * @return property wrapper value around String
+ */
@SuppressWarnings("unchecked")
public PropertyValue<String> getTextTransform() {
checkValidity();
return (PropertyValue<String>) new PropertyValue(nativeGetTextTransform());
}
+ /**
+ * Get the TextOffset property
+ *
+ * @return property wrapper value around Float[]
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Float[]> getTextOffset() {
checkValidity();
return (PropertyValue<Float[]>) new PropertyValue(nativeGetTextOffset());
}
+ /**
+ * Get the TextAllowOverlap property
+ *
+ * @return property wrapper value around Boolean
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Boolean> getTextAllowOverlap() {
checkValidity();
return (PropertyValue<Boolean>) new PropertyValue(nativeGetTextAllowOverlap());
}
+ /**
+ * Get the TextIgnorePlacement property
+ *
+ * @return property wrapper value around Boolean
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Boolean> getTextIgnorePlacement() {
checkValidity();
return (PropertyValue<Boolean>) new PropertyValue(nativeGetTextIgnorePlacement());
}
+ /**
+ * Get the TextOptional property
+ *
+ * @return property wrapper value around Boolean
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Boolean> getTextOptional() {
checkValidity();
return (PropertyValue<Boolean>) new PropertyValue(nativeGetTextOptional());
}
+ /**
+ * Get the IconOpacity property
+ *
+ * @return property wrapper value around Float
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Float> getIconOpacity() {
checkValidity();
return (PropertyValue<Float>) new PropertyValue(nativeGetIconOpacity());
}
+ /**
+ * Get the IconColor property
+ *
+ * @return property wrapper value around String
+ */
@SuppressWarnings("unchecked")
public PropertyValue<String> getIconColor() {
checkValidity();
return (PropertyValue<String>) new PropertyValue(nativeGetIconColor());
}
- /**
- * The color of the icon. This can only be used with sdf icons.
- * @throws RuntimeException
- */
+ /**
+ * The color of the icon. This can only be used with sdf icons.
+ *
+ * @return int representation of a rgba string color
+ * @throws RuntimeException thrown if property isn't a value
+ */
@ColorInt
public int getIconColorAsInt() {
checkValidity();
@@ -292,15 +523,22 @@ public class SymbolLayer extends Layer {
}
+ /**
+ * Get the IconHaloColor property
+ *
+ * @return property wrapper value around String
+ */
@SuppressWarnings("unchecked")
public PropertyValue<String> getIconHaloColor() {
checkValidity();
return (PropertyValue<String>) new PropertyValue(nativeGetIconHaloColor());
}
- /**
- * The color of the icon's halo. Icon halos can only be used with sdf icons.
- * @throws RuntimeException
- */
+ /**
+ * The color of the icon's halo. Icon halos can only be used with sdf icons.
+ *
+ * @return int representation of a rgba string color
+ * @throws RuntimeException thrown if property isn't a value
+ */
@ColorInt
public int getIconHaloColorAsInt() {
checkValidity();
@@ -313,45 +551,77 @@ public class SymbolLayer extends Layer {
}
+ /**
+ * Get the IconHaloWidth property
+ *
+ * @return property wrapper value around Float
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Float> getIconHaloWidth() {
checkValidity();
return (PropertyValue<Float>) new PropertyValue(nativeGetIconHaloWidth());
}
+ /**
+ * Get the IconHaloBlur property
+ *
+ * @return property wrapper value around Float
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Float> getIconHaloBlur() {
checkValidity();
return (PropertyValue<Float>) new PropertyValue(nativeGetIconHaloBlur());
}
+ /**
+ * Get the IconTranslate property
+ *
+ * @return property wrapper value around Float[]
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Float[]> getIconTranslate() {
checkValidity();
return (PropertyValue<Float[]>) new PropertyValue(nativeGetIconTranslate());
}
+ /**
+ * Get the IconTranslateAnchor property
+ *
+ * @return property wrapper value around String
+ */
@SuppressWarnings("unchecked")
public PropertyValue<String> getIconTranslateAnchor() {
checkValidity();
return (PropertyValue<String>) new PropertyValue(nativeGetIconTranslateAnchor());
}
+ /**
+ * Get the TextOpacity property
+ *
+ * @return property wrapper value around Float
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Float> getTextOpacity() {
checkValidity();
return (PropertyValue<Float>) new PropertyValue(nativeGetTextOpacity());
}
+ /**
+ * Get the TextColor property
+ *
+ * @return property wrapper value around String
+ */
@SuppressWarnings("unchecked")
public PropertyValue<String> getTextColor() {
checkValidity();
return (PropertyValue<String>) new PropertyValue(nativeGetTextColor());
}
- /**
- * The color with which the text will be drawn.
- * @throws RuntimeException
- */
+ /**
+ * The color with which the text will be drawn.
+ *
+ * @return int representation of a rgba string color
+ * @throws RuntimeException thrown if property isn't a value
+ */
@ColorInt
public int getTextColorAsInt() {
checkValidity();
@@ -364,15 +634,22 @@ public class SymbolLayer extends Layer {
}
+ /**
+ * Get the TextHaloColor property
+ *
+ * @return property wrapper value around String
+ */
@SuppressWarnings("unchecked")
public PropertyValue<String> getTextHaloColor() {
checkValidity();
return (PropertyValue<String>) new PropertyValue(nativeGetTextHaloColor());
}
- /**
- * The color of the text's halo, which helps it stand out from backgrounds.
- * @throws RuntimeException
- */
+ /**
+ * The color of the text's halo, which helps it stand out from backgrounds.
+ *
+ * @return int representation of a rgba string color
+ * @throws RuntimeException thrown if property isn't a value
+ */
@ColorInt
public int getTextHaloColorAsInt() {
checkValidity();
@@ -385,24 +662,44 @@ public class SymbolLayer extends Layer {
}
+ /**
+ * Get the TextHaloWidth property
+ *
+ * @return property wrapper value around Float
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Float> getTextHaloWidth() {
checkValidity();
return (PropertyValue<Float>) new PropertyValue(nativeGetTextHaloWidth());
}
+ /**
+ * Get the TextHaloBlur property
+ *
+ * @return property wrapper value around Float
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Float> getTextHaloBlur() {
checkValidity();
return (PropertyValue<Float>) new PropertyValue(nativeGetTextHaloBlur());
}
+ /**
+ * Get the TextTranslate property
+ *
+ * @return property wrapper value around Float[]
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Float[]> getTextTranslate() {
checkValidity();
return (PropertyValue<Float[]>) new PropertyValue(nativeGetTextTranslate());
}
+ /**
+ * Get the TextTranslateAnchor property
+ *
+ * @return property wrapper value around String
+ */
@SuppressWarnings("unchecked")
public PropertyValue<String> getTextTranslateAnchor() {
checkValidity();