summaryrefslogtreecommitdiff
path: root/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/BackgroundLayer.java
diff options
context:
space:
mode:
Diffstat (limited to 'platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/BackgroundLayer.java')
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/BackgroundLayer.java42
1 files changed, 37 insertions, 5 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/BackgroundLayer.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/BackgroundLayer.java
index 08cb6b3a18..394a3ed5fd 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/BackgroundLayer.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/BackgroundLayer.java
@@ -13,17 +13,32 @@ import static com.mapbox.mapboxsdk.utils.ColorUtils.*;
*/
public class BackgroundLayer extends Layer {
+ /**
+ * Creates a BackgroundLayer.
+ *
+ * @param nativePtr pointer used by core
+ */
public BackgroundLayer(long nativePtr) {
super(nativePtr);
}
+ /**
+ * Creates a BackgroundLayer.
+ *
+ * @param layerId the id of the layer
+ */
public BackgroundLayer(String layerId) {
initialize(layerId);
}
protected native void initialize(String layerId);
-
+ /**
+ * Set a property or properties.
+ *
+ * @param properties the var-args properties
+ * @return This
+ */
public BackgroundLayer withProperties(@NonNull Property<?>... properties) {
setProperties(properties);
return this;
@@ -31,15 +46,22 @@ public class BackgroundLayer extends Layer {
// Property getters
+ /**
+ * Get the BackgroundColor property
+ *
+ * @return property wrapper value around String
+ */
@SuppressWarnings("unchecked")
public PropertyValue<String> getBackgroundColor() {
checkValidity();
return (PropertyValue<String>) new PropertyValue(nativeGetBackgroundColor());
}
- /**
- * The color with which the background will be drawn.
- * @throws RuntimeException
- */
+ /**
+ * The color with which the background will be drawn.
+ *
+ * @return int representation of a rgba string color
+ * @throws RuntimeException thrown if property isn't a value
+ */
@ColorInt
public int getBackgroundColorAsInt() {
checkValidity();
@@ -52,12 +74,22 @@ public class BackgroundLayer extends Layer {
}
+ /**
+ * Get the BackgroundPattern property
+ *
+ * @return property wrapper value around String
+ */
@SuppressWarnings("unchecked")
public PropertyValue<String> getBackgroundPattern() {
checkValidity();
return (PropertyValue<String>) new PropertyValue(nativeGetBackgroundPattern());
}
+ /**
+ * Get the BackgroundOpacity property
+ *
+ * @return property wrapper value around Float
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Float> getBackgroundOpacity() {
checkValidity();