summaryrefslogtreecommitdiff
path: root/platform
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
parent78387e9167f1072265d6e06b4a4a423dfe405c4a (diff)
downloadqtlocation-mapboxgl-532c659b22c73eac04c7d643aff6ac5f1cc9f55a.tar.gz
[android] javadoc cleanup part 2
Diffstat (limited to 'platform')
-rw-r--r--platform/android/MapboxGLAndroidSDK/build.gradle5
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java31
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/BackgroundLayer.java42
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/CircleLayer.java96
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/FillLayer.java106
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/LineLayer.java131
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/RasterLayer.java64
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/SymbolLayer.java331
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/layer.java.ejs71
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/package-info.java4
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/sources/TileSet.java24
-rw-r--r--platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/sources/package-info.java4
12 files changed, 849 insertions, 60 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/build.gradle b/platform/android/MapboxGLAndroidSDK/build.gradle
index 38688a9aca..e2042fa6da 100644
--- a/platform/android/MapboxGLAndroidSDK/build.gradle
+++ b/platform/android/MapboxGLAndroidSDK/build.gradle
@@ -75,16 +75,15 @@ configurations {
all*.exclude group: 'commons-collections', module: 'commons-collections'
}
-
android.libraryVariants.all { variant ->
def name = variant.name
+ //noinspection GroovyAssignabilityCheck
task "javadoc$name"(type: Javadoc) {
description = "Generates javadoc for build $name"
failOnError = false
destinationDir = new File(destinationDir, variant.baseName)
source = files(variant.javaCompile.source)
classpath = files(variant.javaCompile.classpath.files) + files(android.bootClasspath)
- exclude '**/R.java', '**/BuildConfig.java', 'com/almeros/**'
options.windowTitle("Mapbox Android SDK $VERSION_NAME Reference")
options.docTitle("Mapbox Android SDK $VERSION_NAME")
options.header("Mapbox Android SDK $VERSION_NAME Reference")
@@ -94,7 +93,7 @@ android.libraryVariants.all { variant ->
options.overview("src/main/java/overview.html")
options.group("Mapbox Android SDK", "com.mapbox.*")
options.group("Third Party Libraries", "com.almeros.*")
- // TODO exclude generated R, BuildConfig, com.almeros.*
+ exclude '**/R.java', '**/BuildConfig.java', 'com/almeros/**'
}
}
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java
index 5cae6e70bb..288c6feb4f 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java
@@ -115,7 +115,11 @@ public class MapboxMap {
}
/**
- * Tries to cast the Layer to T, returns null if it's another type
+ * Tries to cast the Layer to T, returns null if it's another type.
+ *
+ * @param layerId the layer id used to look up a layer
+ * @param <T> the generic attribute of a Layer
+ * @return the casted Layer, null if another type
*/
@Nullable
@UiThread
@@ -233,7 +237,7 @@ public class MapboxMap {
/**
* Gets the user interface settings for the map.
*
- * @return
+ * @return the UiSettings associated with this map
*/
public UiSettings getUiSettings() {
return mUiSettings;
@@ -246,7 +250,7 @@ public class MapboxMap {
/**
* Gets the tracking interface settings for the map.
*
- * @return
+ * @return the TrackingSettings asssociated with this map
*/
public TrackingSettings getTrackingSettings() {
return mTrackingSettings;
@@ -258,6 +262,8 @@ public class MapboxMap {
/**
* Gets the settings of the user location for the map.
+ *
+ * @return the MyLocationViewSettings associated with this map
*/
public MyLocationViewSettings getMyLocationViewSettings() {
if (myLocationViewSettings == null) {
@@ -272,6 +278,8 @@ public class MapboxMap {
/**
* Get the Projection object that you can use to convert between screen coordinates and latitude/longitude coordinates.
+ *
+ * @return the Projection associated with this map
*/
public Projection getProjection() {
return mProjection;
@@ -299,7 +307,7 @@ public class MapboxMap {
* The move is instantaneous, and a subsequent getCameraPosition() will reflect the new position.
* See CameraUpdateFactory for a set of updates.
*
- * @param cameraPosition
+ * @param cameraPosition the camera position to set
*/
public void setCameraPosition(@NonNull CameraPosition cameraPosition) {
moveCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));
@@ -322,7 +330,8 @@ public class MapboxMap {
* The move is instantaneous, and a subsequent getCameraPosition() will reflect the new position.
* See CameraUpdateFactory for a set of updates.
*
- * @param update The change that should be applied to the camera.
+ * @param update The change that should be applied to the camera
+ * @param callback the callback to be invoked when an animation finishes or is canceled
*/
@UiThread
public final void moveCamera(CameraUpdate update, MapboxMap.CancelableCallback callback) {
@@ -1111,7 +1120,8 @@ public class MapboxMap {
/**
* Return a annotation based on its id.
*
- * @return An annotation with a matched id, null is returned if no match was found.
+ * @param id the id used to look up an annotation
+ * @return An annotation with a matched id, null is returned if no match was found
*/
@Nullable
public Annotation getAnnotation(long id) {
@@ -1122,7 +1132,7 @@ public class MapboxMap {
* Returns a list of all the annotations on the map.
*
* @return A list of all the annotation objects. The returned object is a copy so modifying this
- * list will not update the map.
+ * list will not update the map
*/
@NonNull
public List<Annotation> getAnnotations() {
@@ -1261,6 +1271,8 @@ public class MapboxMap {
/**
* Deselects a currently selected marker. The selected marker will have it's info window closed.
+ *
+ * @param marker the marker to deselect
*/
@UiThread
public void deselectMarker(@NonNull Marker marker) {
@@ -1989,9 +2001,6 @@ public class MapboxMap {
/**
* Interface definition for a callback to be invoked when the user clicks on a MarkerView.
- * </p>
- * {@link MarkerViewManager#setOnMarkerViewClickListener(OnMarkerViewClickListener)}
- * </p>
*/
public interface OnMarkerViewClickListener {
@@ -2072,6 +2081,8 @@ public class MapboxMap {
public interface SnapshotReadyCallback {
/**
* Invoked when the snapshot has been taken.
+ *
+ * @param snapshot the snapshot bitmap
*/
void onSnapshotReady(Bitmap snapshot);
}
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();
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/CircleLayer.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/CircleLayer.java
index 3bb25372cd..ee0236303a 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/CircleLayer.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/CircleLayer.java
@@ -13,47 +13,96 @@ import static com.mapbox.mapboxsdk.utils.ColorUtils.*;
*/
public class CircleLayer extends Layer {
+ /**
+ * Creates a CircleLayer.
+ *
+ * @param nativePtr pointer used by core
+ */
public CircleLayer(long nativePtr) {
super(nativePtr);
}
+ /**
+ * Creates a CircleLayer.
+ *
+ * @param layerId the id of the layer
+ * @param sourceId the id of the source
+ */
public CircleLayer(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 CircleLayer 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 CircleLayer withFilter(Object[] filter) {
setFilter(filter);
return this;
}
+ /**
+ * Set a single filter.
+ *
+ * @param filter the filter to set
+ * @return This
+ */
public CircleLayer withFilter(Filter.Statement filter) {
setFilter(filter);
return this;
}
+ /**
+ * Set a property or properties.
+ *
+ * @param properties the var-args properties
+ * @return This
+ */
public CircleLayer withProperties(@NonNull Property<?>... properties) {
setProperties(properties);
return this;
@@ -61,21 +110,33 @@ public class CircleLayer extends Layer {
// Property getters
+ /**
+ * Get the CircleRadius property
+ *
+ * @return property wrapper value around Float
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Float> getCircleRadius() {
checkValidity();
return (PropertyValue<Float>) new PropertyValue(nativeGetCircleRadius());
}
+ /**
+ * Get the CircleColor property
+ *
+ * @return property wrapper value around String
+ */
@SuppressWarnings("unchecked")
public PropertyValue<String> getCircleColor() {
checkValidity();
return (PropertyValue<String>) new PropertyValue(nativeGetCircleColor());
}
- /**
- * The color of the circle.
- * @throws RuntimeException
- */
+ /**
+ * The color of the circle.
+ *
+ * @return int representation of a rgba string color
+ * @throws RuntimeException thrown if property isn't a value
+ */
@ColorInt
public int getCircleColorAsInt() {
checkValidity();
@@ -88,30 +149,55 @@ public class CircleLayer extends Layer {
}
+ /**
+ * Get the CircleBlur property
+ *
+ * @return property wrapper value around Float
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Float> getCircleBlur() {
checkValidity();
return (PropertyValue<Float>) new PropertyValue(nativeGetCircleBlur());
}
+ /**
+ * Get the CircleOpacity property
+ *
+ * @return property wrapper value around Float
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Float> getCircleOpacity() {
checkValidity();
return (PropertyValue<Float>) new PropertyValue(nativeGetCircleOpacity());
}
+ /**
+ * Get the CircleTranslate property
+ *
+ * @return property wrapper value around Float[]
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Float[]> getCircleTranslate() {
checkValidity();
return (PropertyValue<Float[]>) new PropertyValue(nativeGetCircleTranslate());
}
+ /**
+ * Get the CircleTranslateAnchor property
+ *
+ * @return property wrapper value around String
+ */
@SuppressWarnings("unchecked")
public PropertyValue<String> getCircleTranslateAnchor() {
checkValidity();
return (PropertyValue<String>) new PropertyValue(nativeGetCircleTranslateAnchor());
}
+ /**
+ * Get the CirclePitchScale property
+ *
+ * @return property wrapper value around String
+ */
@SuppressWarnings("unchecked")
public PropertyValue<String> getCirclePitchScale() {
checkValidity();
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/FillLayer.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/FillLayer.java
index cf4d3356cd..92813f58ef 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/FillLayer.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/FillLayer.java
@@ -13,47 +13,96 @@ import static com.mapbox.mapboxsdk.utils.ColorUtils.*;
*/
public class FillLayer extends Layer {
+ /**
+ * Creates a FillLayer.
+ *
+ * @param nativePtr pointer used by core
+ */
public FillLayer(long nativePtr) {
super(nativePtr);
}
+ /**
+ * Creates a FillLayer.
+ *
+ * @param layerId the id of the layer
+ * @param sourceId the id of the source
+ */
public FillLayer(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 FillLayer 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 FillLayer withFilter(Object[] filter) {
setFilter(filter);
return this;
}
+ /**
+ * Set a single filter.
+ *
+ * @param filter the filter to set
+ * @return This
+ */
public FillLayer withFilter(Filter.Statement filter) {
setFilter(filter);
return this;
}
+ /**
+ * Set a property or properties.
+ *
+ * @param properties the var-args properties
+ * @return This
+ */
public FillLayer withProperties(@NonNull Property<?>... properties) {
setProperties(properties);
return this;
@@ -61,27 +110,44 @@ public class FillLayer extends Layer {
// Property getters
+ /**
+ * Get the FillAntialias property
+ *
+ * @return property wrapper value around Boolean
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Boolean> getFillAntialias() {
checkValidity();
return (PropertyValue<Boolean>) new PropertyValue(nativeGetFillAntialias());
}
+ /**
+ * Get the FillOpacity property
+ *
+ * @return property wrapper value around Float
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Float> getFillOpacity() {
checkValidity();
return (PropertyValue<Float>) new PropertyValue(nativeGetFillOpacity());
}
+ /**
+ * Get the FillColor property
+ *
+ * @return property wrapper value around String
+ */
@SuppressWarnings("unchecked")
public PropertyValue<String> getFillColor() {
checkValidity();
return (PropertyValue<String>) new PropertyValue(nativeGetFillColor());
}
- /**
- * The color of the filled part of this layer. This color can be specified as rgba with an alpha component and the color's opacity will not affect the opacity of the 1px stroke, if it is used.
- * @throws RuntimeException
- */
+ /**
+ * The color of the filled part of this layer. This color can be specified as rgba with an alpha component and the color's opacity will not affect the opacity of the 1px stroke, if it is used.
+ *
+ * @return int representation of a rgba string color
+ * @throws RuntimeException thrown if property isn't a value
+ */
@ColorInt
public int getFillColorAsInt() {
checkValidity();
@@ -94,15 +160,22 @@ public class FillLayer extends Layer {
}
+ /**
+ * Get the FillOutlineColor property
+ *
+ * @return property wrapper value around String
+ */
@SuppressWarnings("unchecked")
public PropertyValue<String> getFillOutlineColor() {
checkValidity();
return (PropertyValue<String>) new PropertyValue(nativeGetFillOutlineColor());
}
- /**
- * The outline color of the fill. Matches the value of `fill-color` if unspecified.
- * @throws RuntimeException
- */
+ /**
+ * The outline color of the fill. Matches the value of `fill-color` if unspecified.
+ *
+ * @return int representation of a rgba string color
+ * @throws RuntimeException thrown if property isn't a value
+ */
@ColorInt
public int getFillOutlineColorAsInt() {
checkValidity();
@@ -115,18 +188,33 @@ public class FillLayer extends Layer {
}
+ /**
+ * Get the FillTranslate property
+ *
+ * @return property wrapper value around Float[]
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Float[]> getFillTranslate() {
checkValidity();
return (PropertyValue<Float[]>) new PropertyValue(nativeGetFillTranslate());
}
+ /**
+ * Get the FillTranslateAnchor property
+ *
+ * @return property wrapper value around String
+ */
@SuppressWarnings("unchecked")
public PropertyValue<String> getFillTranslateAnchor() {
checkValidity();
return (PropertyValue<String>) new PropertyValue(nativeGetFillTranslateAnchor());
}
+ /**
+ * Get the FillPattern property
+ *
+ * @return property wrapper value around String
+ */
@SuppressWarnings("unchecked")
public PropertyValue<String> getFillPattern() {
checkValidity();
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/LineLayer.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/LineLayer.java
index 1af71ad9d5..50f43fdb90 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/LineLayer.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/LineLayer.java
@@ -13,47 +13,96 @@ import static com.mapbox.mapboxsdk.utils.ColorUtils.*;
*/
public class LineLayer extends Layer {
+ /**
+ * Creates a LineLayer.
+ *
+ * @param nativePtr pointer used by core
+ */
public LineLayer(long nativePtr) {
super(nativePtr);
}
+ /**
+ * Creates a LineLayer.
+ *
+ * @param layerId the id of the layer
+ * @param sourceId the id of the source
+ */
public LineLayer(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 LineLayer 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 LineLayer withFilter(Object[] filter) {
setFilter(filter);
return this;
}
+ /**
+ * Set a single filter.
+ *
+ * @param filter the filter to set
+ * @return This
+ */
public LineLayer withFilter(Filter.Statement filter) {
setFilter(filter);
return this;
}
+ /**
+ * Set a property or properties.
+ *
+ * @param properties the var-args properties
+ * @return This
+ */
public LineLayer withProperties(@NonNull Property<?>... properties) {
setProperties(properties);
return this;
@@ -61,45 +110,77 @@ public class LineLayer extends Layer {
// Property getters
+ /**
+ * Get the LineCap property
+ *
+ * @return property wrapper value around String
+ */
@SuppressWarnings("unchecked")
public PropertyValue<String> getLineCap() {
checkValidity();
return (PropertyValue<String>) new PropertyValue(nativeGetLineCap());
}
+ /**
+ * Get the LineJoin property
+ *
+ * @return property wrapper value around String
+ */
@SuppressWarnings("unchecked")
public PropertyValue<String> getLineJoin() {
checkValidity();
return (PropertyValue<String>) new PropertyValue(nativeGetLineJoin());
}
+ /**
+ * Get the LineMiterLimit property
+ *
+ * @return property wrapper value around Float
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Float> getLineMiterLimit() {
checkValidity();
return (PropertyValue<Float>) new PropertyValue(nativeGetLineMiterLimit());
}
+ /**
+ * Get the LineRoundLimit property
+ *
+ * @return property wrapper value around Float
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Float> getLineRoundLimit() {
checkValidity();
return (PropertyValue<Float>) new PropertyValue(nativeGetLineRoundLimit());
}
+ /**
+ * Get the LineOpacity property
+ *
+ * @return property wrapper value around Float
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Float> getLineOpacity() {
checkValidity();
return (PropertyValue<Float>) new PropertyValue(nativeGetLineOpacity());
}
+ /**
+ * Get the LineColor property
+ *
+ * @return property wrapper value around String
+ */
@SuppressWarnings("unchecked")
public PropertyValue<String> getLineColor() {
checkValidity();
return (PropertyValue<String>) new PropertyValue(nativeGetLineColor());
}
- /**
- * The color with which the line will be drawn.
- * @throws RuntimeException
- */
+ /**
+ * The color with which the line will be drawn.
+ *
+ * @return int representation of a rgba string color
+ * @throws RuntimeException thrown if property isn't a value
+ */
@ColorInt
public int getLineColorAsInt() {
checkValidity();
@@ -112,48 +193,88 @@ public class LineLayer extends Layer {
}
+ /**
+ * Get the LineTranslate property
+ *
+ * @return property wrapper value around Float[]
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Float[]> getLineTranslate() {
checkValidity();
return (PropertyValue<Float[]>) new PropertyValue(nativeGetLineTranslate());
}
+ /**
+ * Get the LineTranslateAnchor property
+ *
+ * @return property wrapper value around String
+ */
@SuppressWarnings("unchecked")
public PropertyValue<String> getLineTranslateAnchor() {
checkValidity();
return (PropertyValue<String>) new PropertyValue(nativeGetLineTranslateAnchor());
}
+ /**
+ * Get the LineWidth property
+ *
+ * @return property wrapper value around Float
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Float> getLineWidth() {
checkValidity();
return (PropertyValue<Float>) new PropertyValue(nativeGetLineWidth());
}
+ /**
+ * Get the LineGapWidth property
+ *
+ * @return property wrapper value around Float
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Float> getLineGapWidth() {
checkValidity();
return (PropertyValue<Float>) new PropertyValue(nativeGetLineGapWidth());
}
+ /**
+ * Get the LineOffset property
+ *
+ * @return property wrapper value around Float
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Float> getLineOffset() {
checkValidity();
return (PropertyValue<Float>) new PropertyValue(nativeGetLineOffset());
}
+ /**
+ * Get the LineBlur property
+ *
+ * @return property wrapper value around Float
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Float> getLineBlur() {
checkValidity();
return (PropertyValue<Float>) new PropertyValue(nativeGetLineBlur());
}
+ /**
+ * Get the LineDasharray property
+ *
+ * @return property wrapper value around Float[]
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Float[]> getLineDasharray() {
checkValidity();
return (PropertyValue<Float[]>) new PropertyValue(nativeGetLineDasharray());
}
+ /**
+ * Get the LinePattern property
+ *
+ * @return property wrapper value around String
+ */
@SuppressWarnings("unchecked")
public PropertyValue<String> getLinePattern() {
checkValidity();
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/RasterLayer.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/RasterLayer.java
index 96c3e9e261..c2f4dffac8 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/RasterLayer.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/RasterLayer.java
@@ -13,27 +13,54 @@ import static com.mapbox.mapboxsdk.utils.ColorUtils.*;
*/
public class RasterLayer extends Layer {
+ /**
+ * Creates a RasterLayer.
+ *
+ * @param nativePtr pointer used by core
+ */
public RasterLayer(long nativePtr) {
super(nativePtr);
}
+ /**
+ * Creates a RasterLayer.
+ *
+ * @param layerId the id of the layer
+ * @param sourceId the id of the source
+ */
public RasterLayer(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 RasterLayer withSourceLayer(String sourceLayer) {
setSourceLayer(sourceLayer);
return this;
}
-
+ /**
+ * Set a property or properties.
+ *
+ * @param properties the var-args properties
+ * @return This
+ */
public RasterLayer withProperties(@NonNull Property<?>... properties) {
setProperties(properties);
return this;
@@ -41,42 +68,77 @@ public class RasterLayer extends Layer {
// Property getters
+ /**
+ * Get the RasterOpacity property
+ *
+ * @return property wrapper value around Float
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Float> getRasterOpacity() {
checkValidity();
return (PropertyValue<Float>) new PropertyValue(nativeGetRasterOpacity());
}
+ /**
+ * Get the RasterHueRotate property
+ *
+ * @return property wrapper value around Float
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Float> getRasterHueRotate() {
checkValidity();
return (PropertyValue<Float>) new PropertyValue(nativeGetRasterHueRotate());
}
+ /**
+ * Get the RasterBrightnessMin property
+ *
+ * @return property wrapper value around Float
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Float> getRasterBrightnessMin() {
checkValidity();
return (PropertyValue<Float>) new PropertyValue(nativeGetRasterBrightnessMin());
}
+ /**
+ * Get the RasterBrightnessMax property
+ *
+ * @return property wrapper value around Float
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Float> getRasterBrightnessMax() {
checkValidity();
return (PropertyValue<Float>) new PropertyValue(nativeGetRasterBrightnessMax());
}
+ /**
+ * Get the RasterSaturation property
+ *
+ * @return property wrapper value around Float
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Float> getRasterSaturation() {
checkValidity();
return (PropertyValue<Float>) new PropertyValue(nativeGetRasterSaturation());
}
+ /**
+ * Get the RasterContrast property
+ *
+ * @return property wrapper value around Float
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Float> getRasterContrast() {
checkValidity();
return (PropertyValue<Float>) new PropertyValue(nativeGetRasterContrast());
}
+ /**
+ * Get the RasterFadeDuration property
+ *
+ * @return property wrapper value around Float
+ */
@SuppressWarnings("unchecked")
public PropertyValue<Float> getRasterFadeDuration() {
checkValidity();
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();
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/layer.java.ejs b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/layer.java.ejs
index 3787af031e..2695478dd8 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/layer.java.ejs
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/layer.java.ejs
@@ -17,50 +17,98 @@ import static com.mapbox.mapboxsdk.utils.ColorUtils.*;
*/
public class <%- camelize(type) %>Layer extends Layer {
+ /**
+ * Creates a <%- camelize(type) %>Layer.
+ *
+ * @param nativePtr pointer used by core
+ */
public <%- camelize(type) %>Layer(long nativePtr) {
super(nativePtr);
}
<% if (type === 'background') { -%>
+ /**
+ * Creates a <%- camelize(type) %>Layer.
+ *
+ * @param layerId the id of the layer
+ */
public <%- camelize(type) %>Layer(String layerId) {
initialize(layerId);
}
protected native void initialize(String layerId);
<% } else { -%>
+ /**
+ * Creates a <%- camelize(type) %>Layer.
+ *
+ * @param layerId the id of the layer
+ * @param sourceId the id of the source
+ */
public <%- camelize(type) %>Layer(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 <%- camelize(type) %>Layer withSourceLayer(String sourceLayer) {
setSourceLayer(sourceLayer);
return this;
}
<% } -%>
-
<% if (type !== 'background' && type !== 'raster') { -%>
+ /**
+ * 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 <%- camelize(type) %>Layer withFilter(Object[] filter) {
setFilter(filter);
return this;
}
+ /**
+ * Set a single filter.
+ *
+ * @param filter the filter to set
+ * @return This
+ */
public <%- camelize(type) %>Layer withFilter(Filter.Statement filter) {
setFilter(filter);
return this;
@@ -68,6 +116,12 @@ public class <%- camelize(type) %>Layer extends Layer {
<% } -%>
+ /**
+ * Set a property or properties.
+ *
+ * @param properties the var-args properties
+ * @return This
+ */
public <%- camelize(type) %>Layer withProperties(@NonNull Property<?>... properties) {
setProperties(properties);
return this;
@@ -76,16 +130,23 @@ public class <%- camelize(type) %>Layer extends Layer {
// Property getters
<% for (const property of properties) { -%>
+ /**
+ * Get the <%- camelize(property.name) %> property
+ *
+ * @return property wrapper value around <%- propertyType(property) %>
+ */
@SuppressWarnings("unchecked")
public PropertyValue<<%- propertyType(property) %>> get<%- camelize(property.name) %>() {
checkValidity();
return (PropertyValue<<%- propertyType(property) %>>) new PropertyValue(nativeGet<%- camelize(property.name) %>());
}
<% if (property.type == 'color') { -%>
- /**
- * <%- property.doc %>
- * @throws RuntimeException
- */
+ /**
+ * <%- property.doc %>
+ *
+ * @return int representation of a rgba string color
+ * @throws RuntimeException thrown if property isn't a value
+ */
@ColorInt
public int get<%- camelize(property.name) %>AsInt() {
checkValidity();
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/package-info.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/package-info.java
new file mode 100644
index 0000000000..2a84cdc179
--- /dev/null
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/package-info.java
@@ -0,0 +1,4 @@
+/**
+ * Contains the Mapbox Maps Android Style Layer API classes.
+ */
+package com.mapbox.mapboxsdk.style.layers;
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/sources/TileSet.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/sources/TileSet.java
index 8e0ec8227f..b645020c21 100644
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/sources/TileSet.java
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/sources/TileSet.java
@@ -54,6 +54,8 @@ public class TileSet {
* contain any legal character. Implementations SHOULD NOT interpret the
* name as HTML.
* "name": "compositing",
+ *
+ * @param name the name to be set
*/
public void setName(String name) {
this.name = name;
@@ -69,6 +71,8 @@ public class TileSet {
* Implementations SHOULD NOT
* interpret the description as HTML.
* "description": "A simple, light grey world."
+ *
+ * @param description the description to set
*/
public void setDescription(String description) {
this.description = description;
@@ -92,6 +96,8 @@ public class TileSet {
* as HTML or literal text. For security reasons, make absolutely sure that
* this field can't be abused as a vector for XSS or beacon tracking.
* "attribution": "<a href='http:openstreetmap.org'>OSM contributors</a>",
+ *
+ * @param attribution the attribution to set
*/
public void setAttribution(String attribution) {
this.attribution = attribution;
@@ -107,6 +113,8 @@ public class TileSet {
* See https:github.com/mapbox/utfgrid-spec/tree/master/1.2
* for the interactivity specification.
* "template": "{{#__teaser__}}{{NAME}}{{/__teaser__}}"
+ *
+ * @param template the template to set
*/
public void setTemplate(String template) {
this.template = template;
@@ -122,6 +130,8 @@ public class TileSet {
* For security reasons, make absolutely sure that this field can't be
* abused as a vector for XSS or beacon tracking.
* "legend": "Dangerous zones are red, safe zones are green"
+ *
+ * @param legend the legend to set
*/
public void setLegend(String legend) {
this.legend = legend;
@@ -136,6 +146,8 @@ public class TileSet {
* direction of the tile coordinates.
* The global-mercator (aka Spherical Mercator) profile is assumed.
* "scheme": "xyz"
+ *
+ * @param scheme the scheme to set
*/
public void setScheme(String scheme) {
this.scheme = scheme;
@@ -160,6 +172,8 @@ public class TileSet {
* <p>
* Example: "http:localhost:8888/admin/1.0.0/broadband/{z}/{x}/{y}.grid.json"
* </p>
+ *
+ * @param grids the grids to set
*/
public void setGrids(String... grids) {
this.grids = grids;
@@ -180,6 +194,8 @@ public class TileSet {
* <p>
* "http:localhost:8888/admin/data.geojson"
* </p>
+ *
+ * @param data the data array to set
*/
public void setData(String... data) {
this.data = data;
@@ -191,6 +207,8 @@ public class TileSet {
/**
* 0. &gt;= 0, &lt; 22. An integer specifying the minimum zoom level.
+ *
+ * @param minZoom the minZoom level to set
*/
public void setMinZoom(float minZoom) {
this.minZoom = minZoom;
@@ -202,6 +220,8 @@ public class TileSet {
/**
* 0. &gt;= 0, &lt;= 22. An integer specifying the maximum zoom level.
+ *
+ * @param maxZoom the maxZoom level to set
*/
public void setMaxZoom(float maxZoom) {
this.maxZoom = maxZoom;
@@ -216,6 +236,8 @@ public class TileSet {
* covered by all zoom levels. The bounds are represented in WGS:84
* latitude and longitude values, in the order left, bottom, right, top.
* Values may be integers or floating point numbers.
+ *
+ * @param bounds the Float array to set
*/
public void setBounds(@Size(value = 4) Float... bounds) {
this.bounds = bounds;
@@ -233,6 +255,8 @@ public class TileSet {
* Implementations can use this value to set the default location. If the
* value is null, implementations may use their own algorithm for
* determining a default location.
+ *
+ * @param center the Float array to set
*/
public void setCenter(@Size(value = 2) Float... center) {
this.center = center;
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/sources/package-info.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/sources/package-info.java
new file mode 100644
index 0000000000..c7c325ee52
--- /dev/null
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/sources/package-info.java
@@ -0,0 +1,4 @@
+/**
+ * Contains the Mapbox Maps Android Style Sources API classes.
+ */
+package com.mapbox.mapboxsdk.style.sources;