diff --git a/platform/android/MapboxGLAndroidSDK/gradle-checkstyle.gradle b/platform/android/MapboxGLAndroidSDK/gradle-checkstyle.gradle
index bfb8341db..05037c6be 100644
--- a/platform/android/MapboxGLAndroidSDK/gradle-checkstyle.gradle
+++ b/platform/android/MapboxGLAndroidSDK/gradle-checkstyle.gradle
@@ -12,6 +12,9 @@ task checkstyle(type: Checkstyle) {
source 'src'
include '**/*.java'
exclude '**/gen/**'
+ exclude '**/style/layers/Property.java'
+ exclude '**/style/layers/PropertyFactory.java'
+ exclude '**/style/layers/*Layer.java'
classpath = files()
ignoreFailures = false
}
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/CameraFunction.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/CameraFunction.java
new file mode 100644
index 000000000..bb87fe8a3
--- /dev/null
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/CameraFunction.java
@@ -0,0 +1,50 @@
+package com.mapbox.mapboxsdk.style.functions;
+
+import android.support.annotation.Keep;
+import android.support.annotation.NonNull;
+
+import com.mapbox.mapboxsdk.style.functions.stops.ExponentialStops;
+import com.mapbox.mapboxsdk.style.functions.stops.IntervalStops;
+import com.mapbox.mapboxsdk.style.functions.stops.Stop;
+import com.mapbox.mapboxsdk.style.functions.stops.Stops;
+
+/**
+ * Camera function. Functions that take camera properties as input (zoom for now)
+ *
+ * Zoom functions allow the appearance of a map feature to change with map’s zoom level.
+ * Zoom functions can be used to create the illusion of depth and control data density.
+ * Each stop is an array with two elements: the first is a zoom level and the second is
+ * a function output value.
+ *
+ * @param the input type
+ * @param the output type
+ * @see Function#zoom
+ */
+public class CameraFunction extends Function {
+
+ /**
+ * Create an exponential camera function
+ *
+ * @param stops @see {@link com.mapbox.mapboxsdk.style.functions.stops.Stops#exponential(float, Stop[])}
+ */
+ CameraFunction(@NonNull ExponentialStops stops) {
+ super(stops);
+ }
+
+ /**
+ * Create an interval camera function
+ *
+ * @param stops @see {@link com.mapbox.mapboxsdk.style.functions.stops.Stops#interval(Stop[])}
+ */
+ CameraFunction(@NonNull IntervalStops stops) {
+ super(stops);
+ }
+
+ /**
+ * JNI constructor
+ */
+ @Keep
+ private CameraFunction(Stops stops) {
+ super(stops);
+ }
+}
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/CompositeFunction.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/CompositeFunction.java
new file mode 100644
index 000000000..1ed43580c
--- /dev/null
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/CompositeFunction.java
@@ -0,0 +1,86 @@
+package com.mapbox.mapboxsdk.style.functions;
+
+import android.support.annotation.NonNull;
+import android.support.annotation.Nullable;
+
+import com.mapbox.mapboxsdk.style.functions.stops.CompositeStops;
+import com.mapbox.mapboxsdk.style.functions.stops.Stops;
+
+import java.util.Map;
+
+/**
+ * Composite functions combine {@link android.graphics.Camera} and {@link SourceFunction}s.
+ *
+ * Composite functions allow the appearance of a map feature to change with both its
+ * properties and zoom. Each stop is an array with two elements, the first is an object
+ * with a property input value and a zoom, and the second is a function output value. Note
+ * that support for property functions is not yet complete.
+ *
+ * @param the zoom type (usually Float)
+ * @param the input type (the feature property type)
+ * @param the output type (the property type)
+ * @see Function#composite
+ */
+public class CompositeFunction extends Function {
+
+ private final String property;
+ private O defaultValue;
+
+ CompositeFunction(@NonNull String property,
+ @NonNull CompositeStops> stops) {
+ this(null, property, stops);
+ }
+
+
+ /**
+ * JNI Constructor
+ */
+ private CompositeFunction(@Nullable O defaultValue, @NonNull String property,
+ @NonNull CompositeStops> stops) {
+ super(stops);
+ this.defaultValue = defaultValue;
+ this.property = property;
+ }
+
+ /**
+ * Set the default value
+ *
+ * @param defaultValue the default value to use when no other applies
+ * @return this (for chaining)
+ */
+ public CompositeFunction withDefaultValue(O defaultValue) {
+ this.defaultValue = defaultValue;
+ return this;
+ }
+
+ /**
+ * @return the defaultValue
+ */
+ @Nullable
+ public O getDefaultValue() {
+ return defaultValue;
+ }
+
+ /**
+ * INTERNAL USAGE ONLY
+ *
+ * @return the feature property name
+ */
+ public String getProperty() {
+ return property;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Map toValueObject() {
+ Map valueObject = super.toValueObject();
+ valueObject.put(PROPERTY_KEY, property);
+ if (defaultValue != null) {
+ valueObject.put(DEFAULT_VALUE_KEY, defaultValue);
+ }
+ return valueObject;
+ }
+
+}
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/Function.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/Function.java
new file mode 100644
index 000000000..8c5186b99
--- /dev/null
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/Function.java
@@ -0,0 +1,301 @@
+package com.mapbox.mapboxsdk.style.functions;
+
+import android.support.annotation.NonNull;
+import android.support.annotation.Nullable;
+
+import com.mapbox.mapboxsdk.style.functions.stops.CategoricalStops;
+import com.mapbox.mapboxsdk.style.functions.stops.CompositeStops;
+import com.mapbox.mapboxsdk.style.functions.stops.ExponentialStops;
+import com.mapbox.mapboxsdk.style.functions.stops.IdentityStops;
+import com.mapbox.mapboxsdk.style.functions.stops.IntervalStops;
+import com.mapbox.mapboxsdk.style.functions.stops.Stop;
+import com.mapbox.mapboxsdk.style.functions.stops.Stops;
+
+import java.util.Map;
+
+import timber.log.Timber;
+
+/**
+ * Functions are used to change properties in relation to the state of the map.
+ *
+ * The value for any layout or paint property may be specified as a function. Functions allow you to
+ * make the appearance of a map feature change with the current zoom level and/or the feature's properties.
+ *
+ * @param the function's input type
+ * @param the target property's value type. Make sure it matches.
+ * @see The style specification
+ */
+public class Function {
+
+ static final String PROPERTY_KEY = "property";
+ static final String DEFAULT_VALUE_KEY = "defaultValue";
+
+ /**
+ * Create an exponential {@link CameraFunction}
+ *
+ * Zoom functions allow the appearance of a map feature to change with map’s zoom.
+ * Zoom functions can be used to create the illusion of depth and control data density.
+ * Each stop is an array with two elements, the first is a zoom and the second is a function output value.
+ *
+ * @param the zoom level type (Float, Integer)
+ * @param the property type
+ * @param stops the stops implementation that define the function. @see {@link Stops#exponential(Stop[])}
+ * @return the {@link CameraFunction}
+ * @see CameraFunction
+ * @see ExponentialStops
+ * @see Stops#exponential(Stop[])
+ * @see Stops#exponential(Stop[])
+ * @see Stop#stop
+ */
+ public static CameraFunction zoom(@NonNull ExponentialStops stops) {
+ return new CameraFunction<>(stops);
+ }
+
+ /**
+ * Create an interval {@link CameraFunction}
+ *
+ * Zoom functions allow the appearance of a map feature to change with map’s zoom.
+ * Zoom functions can be used to create the illusion of depth and control data density.
+ * Each stop is an array with two elements, the first is a zoom and the second is a function output value.
+ *
+ * @param the zoom level type (Float, Integer)
+ * @param the property type
+ * @param stops the stops implementation that define the function. @see {@link Stops#interval(Stop[])}
+ * @return the {@link CameraFunction}
+ * @see CameraFunction
+ * @see IntervalStops
+ * @see Stops#interval(Stop[])
+ * @see Stop#stop
+ */
+ public static CameraFunction zoom(@NonNull IntervalStops stops) {
+ return new CameraFunction<>(stops);
+ }
+
+ /**
+ * Create an exponential {@link SourceFunction}
+ *
+ * Source functions allow the appearance of a map feature to change with
+ * its properties. Source functions can be used to visually differentiate
+ * types of features within the same layer or create data visualizations.
+ * Each stop is an array with two elements, the first is a property input
+ * value and the second is a function output value. Note that support for
+ * property functions is not available across all properties and platforms
+ * at this time.
+ *
+ * @param property the feature property name
+ * @param stops the stops
+ * @param the function input type
+ * @param the function output type
+ * @return the {@link SourceFunction}
+ * @see SourceFunction
+ * @see ExponentialStops
+ * @see Stops#exponential(Stop[])
+ * @see Stop#stop
+ */
+ public static SourceFunction property(@NonNull String property, @NonNull ExponentialStops stops) {
+ return new SourceFunction<>(property, stops);
+ }
+
+ /**
+ * Create an identity {@link SourceFunction}
+ *
+ * Source functions allow the appearance of a map feature to change with
+ * its properties. Source functions can be used to visually differentiate
+ * types of features within the same layer or create data visualizations.
+ * Each stop is an array with two elements, the first is a property input
+ * value and the second is a function output value. Note that support for
+ * property functions is not available across all properties and platforms
+ * at this time.
+ *
+ * @param property the feature property name
+ * @param stops the stops
+ * @param the function input/output type
+ * @return the {@link SourceFunction}
+ * @see SourceFunction
+ * @see IdentityStops
+ * @see Stops#identity()
+ * @see Stop#stop
+ */
+ public static SourceFunction property(@NonNull String property, @NonNull IdentityStops stops) {
+ return new SourceFunction<>(property, stops);
+ }
+
+ /**
+ * Create an interval {@link SourceFunction}
+ *
+ * Source functions allow the appearance of a map feature to change with
+ * its properties. Source functions can be used to visually differentiate
+ * types of features within the same layer or create data visualizations.
+ * Each stop is an array with two elements, the first is a property input
+ * value and the second is a function output value. Note that support for
+ * property functions is not available across all properties and platforms
+ * at this time.
+ *
+ * @param property the feature property name
+ * @param stops the stops
+ * @param the function input type
+ * @param the function output type
+ * @return the {@link SourceFunction}
+ * @see SourceFunction
+ * @see IntervalStops
+ * @see Stops#interval(Stop[])
+ * @see Stop#stop
+ */
+ public static SourceFunction property(@NonNull String property, @NonNull IntervalStops stops) {
+ return new SourceFunction<>(property, stops);
+ }
+
+ /**
+ * Create an categorical {@link SourceFunction}
+ *
+ * Source functions allow the appearance of a map feature to change with
+ * its properties. Source functions can be used to visually differentiate
+ * types of features within the same layer or create data visualizations.
+ * Each stop is an array with two elements, the first is a property input
+ * value and the second is a function output value. Note that support for
+ * property functions is not available across all properties and platforms
+ * at this time.
+ *
+ * @param property the feature property name
+ * @param stops the stops
+ * @param the function input type
+ * @param the function output type
+ * @return the {@link SourceFunction}
+ * @see SourceFunction
+ * @see CategoricalStops
+ * @see Stops#categorical(Stop[])
+ * @see Stop#stop
+ */
+ public static SourceFunction property(@NonNull String property, @NonNull CategoricalStops stops) {
+ return new SourceFunction<>(property, stops);
+ }
+
+ /**
+ * Create a composite, categorical function.
+ *
+ * Composite functions allow the appearance of a map feature to change with both its
+ * properties and zoom. Each stop is an array with two elements, the first is an object
+ * with a property input value and a zoom, and the second is a function output value. Note
+ * that support for property functions is not yet complete.
+ *
+ * @param property the feature property name for the source part of the function
+ * @param stops the stops
+ * @param the zoom function input type (Float usually)
+ * @param the function input type for the source part of the function
+ * @param the function output type
+ * @return the {@link CompositeFunction}
+ * @see CompositeFunction
+ * @see CategoricalStops
+ * @see Stops#categorical(Stop[])
+ * @see Stop#stop
+ */
+ public static CompositeFunction composite(
+ @NonNull String property,
+ @NonNull CategoricalStops, O> stops) {
+
+ return new CompositeFunction<>(property, new CompositeStops<>(stops));
+ }
+
+ /**
+ * Create a composite, exponential function.
+ *
+ * Composite functions allow the appearance of a map feature to change with both its
+ * properties and zoom. Each stop is an array with two elements, the first is an object
+ * with a property input value and a zoom, and the second is a function output value. Note
+ * that support for property functions is not yet complete.
+ *
+ * @param property the feature property name for the source part of the function
+ * @param stops the stops
+ * @param the zoom function input type (Float usually)
+ * @param the function input type for the source part of the function
+ * @param the function output type
+ * @return the {@link CompositeFunction}
+ * @see CompositeFunction
+ * @see ExponentialStops
+ * @see Stops#exponential(Stop[])
+ * @see Stop#stop
+ */
+ public static CompositeFunction composite(
+ @NonNull String property,
+ @NonNull ExponentialStops, O> stops) {
+
+ return new CompositeFunction<>(property, new CompositeStops<>(stops));
+ }
+
+ /**
+ * Create a composite, interval function.
+ *
+ * Composite functions allow the appearance of a map feature to change with both its
+ * properties and zoom. Each stop is an array with two elements, the first is an object
+ * with a property input value and a zoom, and the second is a function output value. Note
+ * that support for property functions is not yet complete.
+ *
+ * @param property the feature property name for the source part of the function
+ * @param stops the stops
+ * @param the zoom function input type (Float usually)
+ * @param the function input type for the source part of the function
+ * @param the function output type
+ * @return the {@link CompositeFunction}
+ * @see CompositeFunction
+ * @see IntervalStops
+ * @see Stops#interval(Stop[])
+ * @see Stop#stop
+ */
+ public static CompositeFunction composite(
+ @NonNull String property,
+ @NonNull IntervalStops, O> stops) {
+
+ return new CompositeFunction<>(property, new CompositeStops<>(stops));
+ }
+
+ // Class definition //
+
+ private final Stops stops;
+
+ /**
+ * JNI Cosntructor for implementation classes
+ *
+ * @param stops the stops
+ */
+ Function(@NonNull Stops stops) {
+ this.stops = stops;
+ }
+
+ /**
+ * @return the stops in this function
+ */
+ public Stops getStops() {
+ return stops;
+ }
+
+ /**
+ * Convenience method
+ *
+ * @param the Stops implementation type
+ * @return the Stops implementation or null when the wrong type is specified
+ */
+ @Nullable
+ public S getStopsAs() {
+ try {
+ // noinspection unchecked
+ return (S) stops;
+ } catch (ClassCastException exception) {
+ Timber.e(String.format("Stops: %s is a different type: %s", stops.getClass(), exception));
+ return null;
+ }
+ }
+
+ /**
+ * INTERNAL USAGE ONLY
+ *
+ * @return a value object representation for core conversion
+ */
+ public Map toValueObject() {
+ return stops.toValueObject();
+ }
+
+ @Override
+ public String toString() {
+ return String.format("%s: %s", getClass().getSimpleName(), stops);
+ }
+}
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/SourceFunction.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/SourceFunction.java
new file mode 100644
index 000000000..f0eed760a
--- /dev/null
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/SourceFunction.java
@@ -0,0 +1,84 @@
+package com.mapbox.mapboxsdk.style.functions;
+
+import android.support.annotation.NonNull;
+import android.support.annotation.Nullable;
+
+import com.mapbox.mapboxsdk.style.functions.stops.Stops;
+
+import java.util.Map;
+
+/**
+ * Source functions take Feature property names as input.
+ *
+ * Source functions allow the appearance of a map feature to change with
+ * its properties. Source functions can be used to visually differentiate
+ * types of features within the same layer or create data visualizations.
+ * Each stop is an array with two elements, the first is a property input
+ * value and the second is a function output value. Note that support for
+ * property functions is not available across all properties and platforms
+ * at this time.
+ *
+ * @param the input type
+ * @param the output type
+ * @see Function#property
+ */
+public class SourceFunction extends Function {
+
+ private final String property;
+ private O defaultValue;
+
+ SourceFunction(@NonNull String property, @NonNull Stops stops) {
+ this(null, property, stops);
+ }
+
+ /**
+ * JNI Constructor
+ */
+ private SourceFunction(@Nullable O defaultValue, @NonNull String property, @NonNull Stops stops) {
+ super(stops);
+ this.property = property;
+ this.defaultValue = defaultValue;
+ }
+
+
+ /**
+ * INTERNAL USAGE ONLY
+ *
+ * @return The feature property name
+ */
+ public String getProperty() {
+ return property;
+ }
+
+ /**
+ * Set the default value
+ *
+ * @param defaultValue the default value to use when no other applies
+ * @return this (for chaining)
+ */
+ public SourceFunction withDefaultValue(O defaultValue) {
+ this.defaultValue = defaultValue;
+ return this;
+ }
+
+ /**
+ * @return the defaultValue
+ */
+ @Nullable
+ public O getDefaultValue() {
+ return defaultValue;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Map toValueObject() {
+ Map valueObject = super.toValueObject();
+ valueObject.put(PROPERTY_KEY, property);
+ if (defaultValue != null) {
+ valueObject.put(DEFAULT_VALUE_KEY, defaultValue);
+ }
+ return valueObject;
+ }
+}
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/package-info.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/package-info.java
new file mode 100644
index 000000000..6979676c9
--- /dev/null
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/package-info.java
@@ -0,0 +1,6 @@
+/**
+ * Contains the Mapbox Maps Android Style Function API classes.
+ *
+ * @see The style specification
+ */
+package com.mapbox.mapboxsdk.style.functions;
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/stops/CategoricalStops.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/stops/CategoricalStops.java
new file mode 100644
index 000000000..f9b292935
--- /dev/null
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/stops/CategoricalStops.java
@@ -0,0 +1,64 @@
+package com.mapbox.mapboxsdk.style.functions.stops;
+
+import android.support.annotation.NonNull;
+import android.support.annotation.Size;
+
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.Map;
+
+/**
+ * {@link Stops} implementation for categorical functions
+ *
+ * @param the {@link Stop} input type
+ * @param the {@link Stop} output type
+ */
+public class CategoricalStops extends IterableStops> {
+
+ private final Stop[] stops;
+
+ /**
+ * Create a categorical {@link Stops} implementation. Use through {@link Stops#categorical(Stop[])}
+ *
+ * @param stops the stops
+ */
+ @SafeVarargs
+ public CategoricalStops(@NonNull @Size(min = 1) Stop... stops) {
+ this.stops = stops;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Map toValueObject() {
+ Map map = super.toValueObject();
+ map.put("stops", toValueObjects(stops));
+ return map;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getTypeName() {
+ return "categorical";
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Iterator> iterator() {
+ return Arrays.asList(stops).iterator();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public int size() {
+ return stops.length;
+ }
+
+}
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/stops/CompositeStops.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/stops/CompositeStops.java
new file mode 100644
index 000000000..7e2ce94fe
--- /dev/null
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/stops/CompositeStops.java
@@ -0,0 +1,151 @@
+package com.mapbox.mapboxsdk.style.functions.stops;
+
+import android.support.annotation.Keep;
+import android.support.annotation.NonNull;
+import android.support.annotation.Size;
+
+import com.mapbox.mapboxsdk.style.functions.stops.Stop.CompositeValue;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * The {@link Stops} implementation for composite functions
+ *
+ * @param the zoom type (usually Float)
+ * @param the input type (the feature property type)
+ * @param the output type (the property type)
+ * @param the {@link Stops} implementation (eg CategoricalStops, {@link ExponentialStops} or {@link IntervalStops})
+ */
+public class CompositeStops>>
+ extends IterableStops, O, Map.Entry> {
+
+ private final Map stops;
+
+ /**
+ * JNI Constructor
+ *
+ * @param stops the stops {@link Map}
+ */
+ @Keep
+ private CompositeStops(@NonNull @Size(min = 1) Map stops) {
+ this.stops = stops;
+ }
+
+ /**
+ * Create composite stops for {@link ExponentialStops}. Use
+ * {@link com.mapbox.mapboxsdk.style.functions.Function#composite(String, ExponentialStops)}
+ *
+ * @param stops the stops
+ */
+ public CompositeStops(@NonNull ExponentialStops, O> stops) {
+ this.stops = new HashMap<>();
+
+ for (Map.Entry>> entry : collect(stops).entrySet()) {
+ // noinspection unchecked
+ this.stops.put(entry.getKey(),
+ (S) new ExponentialStops<>(stops.getBase(), entry.getValue().toArray(new Stop[0])));
+ }
+ }
+
+ /**
+ * Create composite stops for {@link IntervalStops}.
+ * Use {@link com.mapbox.mapboxsdk.style.functions.Function#composite(String, IntervalStops)}
+ *
+ * @param stops the stops
+ */
+ public CompositeStops(@NonNull IntervalStops, O> stops) {
+ this.stops = new HashMap<>();
+
+ for (Map.Entry>> entry : collect(stops).entrySet()) {
+ // noinspection unchecked
+ this.stops.put(entry.getKey(), (S) new IntervalStops<>(entry.getValue().toArray(new Stop[0])));
+ }
+ }
+
+ /**
+ * Create composite stops for {@link CategoricalStops}.
+ * Use {@link com.mapbox.mapboxsdk.style.functions.Function#composite(String, CategoricalStops)}
+ *
+ * @param stops the stops
+ */
+ public CompositeStops(@NonNull CategoricalStops, O> stops) {
+ this.stops = new HashMap<>();
+
+ for (Map.Entry>> entry : collect(stops).entrySet()) {
+ // noinspection unchecked
+ this.stops.put(entry.getKey(), (S) new CategoricalStops<>(entry.getValue().toArray(new Stop[0])));
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getTypeName() {
+ return stops.values().iterator().next().getTypeName();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Map toValueObject() {
+ Map map = super.toValueObject();
+
+ // Flatten and toValueObjects stops
+ // noinspection unchecked
+ map.put("stops", toValueObjects(flatten(this.stops).toArray(new Stop[0])));
+
+ return map;
+ }
+
+ @NonNull
+ private List, O>> flatten(Map stops) {
+ List, O>> flattenedStops = new ArrayList<>();
+ for (Map.Entry entry : stops.entrySet()) {
+ for (Stop stop : entry.getValue()) {
+ flattenedStops.add(new Stop<>(new CompositeValue<>(entry.getKey(), stop.in), stop.out));
+ }
+ }
+ return flattenedStops;
+ }
+
+ @NonNull
+ private Map>> collect(
+ @NonNull IterableStops, O, Stop, O>> stops) {
+ Map>> converted = new HashMap<>();
+
+ for (Stop, O> stop : stops) {
+ List> stopsForZ = converted.get(stop.in.zoom);
+ if (stopsForZ == null) {
+ stopsForZ = new ArrayList<>();
+ converted.put(stop.in.zoom, stopsForZ);
+ }
+
+ stopsForZ.add(new Stop<>(stop.in.value, stop.out));
+ }
+
+ return converted;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Iterator> iterator() {
+ return stops.entrySet().iterator();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public int size() {
+ return stops.size();
+ }
+
+}
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/stops/ExponentialStops.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/stops/ExponentialStops.java
new file mode 100644
index 000000000..d47aa1fc9
--- /dev/null
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/stops/ExponentialStops.java
@@ -0,0 +1,97 @@
+package com.mapbox.mapboxsdk.style.functions.stops;
+
+import android.support.annotation.NonNull;
+import android.support.annotation.Size;
+
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.Map;
+
+/**
+ * The {@link Stops} implementation for exponential functions
+ *
+ * @param the input type
+ * @param the output type
+ */
+public class ExponentialStops extends IterableStops> {
+
+ private float base;
+ private final Stop[] stops;
+
+ /**
+ * Create exponential stops with an explicit base. Use through {@link Stops#exponential(Stop[])}
+ *
+ * @param base The exponential base of the interpolation curve. It controls the rate at which the function output
+ * increases. Higher values make the output increase more towards the high end of the range.
+ * With values close to 1 the output increases linearly.
+ * @param stops the stops
+ */
+ @SafeVarargs
+ public ExponentialStops(Float base, @NonNull @Size(min = 1) Stop... stops) {
+ this.base = base != null ? base : 1.0f;
+ this.stops = stops;
+ }
+
+ /**
+ * Create exponential stops without an explicit base. Use through {@link Stops#exponential(Stop[])}
+ *
+ * @param stops the stops
+ */
+ @SafeVarargs
+ public ExponentialStops(@NonNull @Size(min = 1) Stop... stops) {
+ this(null, stops);
+ }
+
+ /**
+ * Set the exponential base
+ *
+ * @param base the base to use in the exponential function
+ * @return this (for chaining)
+ */
+ public ExponentialStops withBase(float base) {
+ this.base = base;
+ return this;
+ }
+
+ /**
+ * @return The exponential base
+ */
+ public float getBase() {
+ return base;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Map toValueObject() {
+ Map map = super.toValueObject();
+ map.put("base", base);
+ map.put("stops", toValueObjects(stops));
+ return map;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getTypeName() {
+ return "exponential";
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Iterator> iterator() {
+ return Arrays.asList(stops).iterator();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public int size() {
+ return stops.length;
+ }
+}
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/stops/IdentityStops.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/stops/IdentityStops.java
new file mode 100644
index 000000000..2c0b198dc
--- /dev/null
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/stops/IdentityStops.java
@@ -0,0 +1,18 @@
+package com.mapbox.mapboxsdk.style.functions.stops;
+
+/**
+ * The {@link Stops} implementation for identity functions
+ *
+ * @param the input/output type
+ */
+public class IdentityStops extends Stops {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected String getTypeName() {
+ return "identity";
+ }
+
+}
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/stops/IntervalStops.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/stops/IntervalStops.java
new file mode 100644
index 000000000..9d95b3f8c
--- /dev/null
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/stops/IntervalStops.java
@@ -0,0 +1,58 @@
+package com.mapbox.mapboxsdk.style.functions.stops;
+
+import android.support.annotation.NonNull;
+import android.support.annotation.Size;
+
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.Map;
+
+/**
+ * The {@link Stops} implementation for interval functions
+ *
+ * @param the input type
+ * @param the output type
+ */
+public class IntervalStops extends IterableStops> {
+
+ private final Stop[] stops;
+
+ @SafeVarargs
+ public IntervalStops(@NonNull @Size(min = 1) Stop... stops) {
+ this.stops = stops;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getTypeName() {
+ return "interval";
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Map toValueObject() {
+ Map map = super.toValueObject();
+ map.put("stops", toValueObjects(stops));
+ return map;
+ }
+
+ /**
+ * @return an {@link Iterator} for the contained stops
+ */
+ @Override
+ public Iterator> iterator() {
+ return Arrays.asList(stops).iterator();
+ }
+
+ /**
+ * @return The number of contained stops
+ */
+ @Override
+ public int size() {
+ return stops.length;
+ }
+}
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/stops/IterableStops.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/stops/IterableStops.java
new file mode 100644
index 000000000..8c5a6e891
--- /dev/null
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/stops/IterableStops.java
@@ -0,0 +1,52 @@
+package com.mapbox.mapboxsdk.style.functions.stops;
+
+import java.util.Iterator;
+
+/**
+ * Base class for {@link Stops} implementations with a collection of stops
+ *
+ * @param the {@link Stops} input type
+ * @param the {@link Stops} output type
+ * @param the {@link Iterable} element type (usually {@link Stop})
+ */
+public abstract class IterableStops extends Stops implements Iterable {
+
+ /**
+ * @return The size of the contained stops collection
+ */
+ public abstract int size();
+
+ /**
+ * Convenience function to toValueObjects an array of stops to an array of value objects
+ *
+ * @param stops the stops to toValueObjects
+ * @return the stops as value objects
+ */
+ Object[] toValueObjects(Stop[] stops) {
+ if (stops != null) {
+ Object[] stopsValue = new Object[stops.length];
+
+ for (int i = 0; i < stopsValue.length; i++) {
+ Stop stop = stops[i];
+ stopsValue[i] = stop.toValueObject();
+ }
+ return stopsValue;
+ }
+
+ return null;
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder buffer = new StringBuilder();
+ Iterator iterator = iterator();
+ while (iterator.hasNext()) {
+ S stop = iterator.next();
+ buffer.append(stop);
+ if (iterator.hasNext()) {
+ buffer.append(",");
+ }
+ }
+ return String.format("%s: [%s]", super.toString(), buffer.toString());
+ }
+}
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/stops/Stop.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/stops/Stop.java
new file mode 100644
index 000000000..80825ccf6
--- /dev/null
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/stops/Stop.java
@@ -0,0 +1,109 @@
+package com.mapbox.mapboxsdk.style.functions.stops;
+
+import com.mapbox.mapboxsdk.style.functions.Function;
+import com.mapbox.mapboxsdk.style.layers.PropertyValue;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * A stop represents a certain point in the range of this function
+ *
+ * @param input the stop (function) input type
+ * @param output the stop (function) output type
+ * @see The style specification
+ */
+public class Stop {
+ /**
+ * Creates a {@link Stop} to use in a {@link Function}
+ *
+ * @param in the input for the stop
+ * @param output the output for the stop
+ * @param the input property type
+ * @param the output property type
+ * @return the {@link Stop}
+ */
+ public static Stop stop(I in, PropertyValue output) {
+ return new Stop<>(in, output.value);
+ }
+
+ /**
+ * Create a composite {@link Stop} for use in a {@link com.mapbox.mapboxsdk.style.functions.CompositeFunction}
+ *
+ * @param zoom the zoom input
+ * @param value the feature property input
+ * @param output the output for the stop
+ * @param the zoom type
+ * @param the feature property input type
+ * @param the output property type
+ * @return the {@link Stop}
+ * @see Function#composite(String, ExponentialStops)
+ */
+ public static Stop, O> stop(Z zoom,
+ I value,
+ PropertyValue output) {
+ return new Stop<>(new Stop.CompositeValue<>(zoom, value), output.value);
+ }
+
+ /**
+ * Represents a composite input value for composite functions (eg zoom and feature property value)
+ *
+ * @param the zoom input type (typically Float)
+ * @param the feature property input type
+ */
+ public static class CompositeValue {
+ Z zoom;
+ V value;
+
+ CompositeValue(Z zoom, V value) {
+ this.zoom = zoom;
+ this.value = value;
+ }
+
+ /**
+ * INTERNAL USAGE ONLY
+ *
+ * @return the value object representation for core conversion
+ */
+ Map toValueObject() {
+ HashMap map = new HashMap<>();
+ map.put("zoom", zoom);
+ map.put("value", value);
+ return map;
+ }
+
+ @Override
+ public String toString() {
+ return String.format("[zoom: %s, value: %s]", zoom, value);
+ }
+ }
+
+ /**
+ * The input type
+ */
+ public final I in;
+
+ /**
+ * The output type
+ */
+ public final O out;
+
+ Stop(I in, O out) {
+ this.in = in;
+ this.out = out;
+ }
+
+ /**
+ * INTERNAL USAGE ONLY
+ *
+ * @return an array representation of the Stop
+ */
+ Object[] toValueObject() {
+ return new Object[] {in instanceof CompositeValue ? ((CompositeValue) in).toValueObject() : in, out};
+ }
+
+ @Override
+ public String toString() {
+ return String.format("[%s, %s]", in, out);
+ }
+}
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/stops/Stops.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/stops/Stops.java
new file mode 100644
index 000000000..a9d805508
--- /dev/null
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/stops/Stops.java
@@ -0,0 +1,97 @@
+package com.mapbox.mapboxsdk.style.functions.stops;
+
+import android.support.annotation.NonNull;
+import android.support.annotation.Size;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * The base class for different stops implementations
+ *
+ * @param the input type
+ * @param the output type
+ * @see The style specification
+ */
+public abstract class Stops {
+
+ /**
+ * Convenience method for use in function declarations
+ *
+ * @param stops the collections of discrete stops
+ * @param the Stops input type
+ * @param the Stops output type
+ * @return the {@link Stops} implementation
+ * @see Stop#stop
+ * @see CategoricalStops
+ */
+ @SafeVarargs
+ public static CategoricalStops categorical(@NonNull @Size(min = 1) Stop... stops) {
+ return new CategoricalStops<>(stops);
+ }
+
+ /**
+ * Convenience method for use in function declarations
+ *
+ * @param stops the collections of discrete stops
+ * @param the Stops input type
+ * @param the Stops output type
+ * @return the {@link Stops} implementation
+ * @see Stop#stop
+ * @see ExponentialStops
+ */
+ @SafeVarargs
+ public static ExponentialStops exponential(@NonNull @Size(min = 1) Stop... stops) {
+ return new ExponentialStops<>(stops);
+ }
+
+ /**
+ * Convenience method for use in function declarations
+ *
+ * @param the Stops input/output type
+ * @return the {@link IdentityStops} implementation
+ * @see Stop#stop
+ * @see IdentityStops
+ */
+ public static IdentityStops identity() {
+ return new IdentityStops<>();
+ }
+
+ /**
+ * Convenience method for use in function declarations
+ *
+ * @param stops the collections of discrete stops
+ * @param the Stops input type
+ * @param the Stops output type
+ * @return the {@link Stops} implementation
+ * @see Stop#stop
+ * @see IntervalStops
+ */
+ @SafeVarargs
+ public static IntervalStops interval(@NonNull @Size(min = 1) Stop... stops) {
+ return new IntervalStops<>(stops);
+ }
+
+ /**
+ * INTERNAL USAGE ONLY
+ *
+ * @return the value object representation for conversion to core
+ */
+ public Map toValueObject() {
+ HashMap map = new HashMap<>();
+ map.put("type", getTypeName());
+ return map;
+ }
+
+ /**
+ * INTERNAL USAGE ONLY
+ *
+ * @return the unique type name as a string according to the style specification
+ */
+ protected abstract String getTypeName();
+
+ @Override
+ public String toString() {
+ return getTypeName();
+ }
+}
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/stops/package-info.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/stops/package-info.java
new file mode 100644
index 000000000..fa388a958
--- /dev/null
+++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/stops/package-info.java
@@ -0,0 +1,6 @@
+/**
+ * Contains the Mapbox Maps Android Style Function Stop implementation API classes.
+ *
+ * @see The style specification
+ */
+package com.mapbox.mapboxsdk.style.functions.stops;
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 45523b41a..0f1265f1a 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
@@ -1,6 +1,7 @@
-package com.mapbox.mapboxsdk.style.layers;
// This file is generated. Edit android/platform/scripts/generate-style-code.js, then run `make android-style-code`.
+package com.mapbox.mapboxsdk.style.layers;
+
import android.support.annotation.ColorInt;
import android.support.annotation.NonNull;
import android.support.annotation.UiThread;
@@ -41,7 +42,7 @@ public class BackgroundLayer extends Layer {
* @param properties the var-args properties
* @return This
*/
- public BackgroundLayer withProperties(@NonNull Property>... properties) {
+ public BackgroundLayer withProperties(@NonNull PropertyValue>... properties) {
setProperties(properties);
return this;
}
@@ -55,7 +56,7 @@ public class BackgroundLayer extends Layer {
*/
@SuppressWarnings("unchecked")
public PropertyValue getBackgroundColor() {
- return (PropertyValue) new PropertyValue(nativeGetBackgroundColor());
+ return (PropertyValue) new PropertyValue("background-color", nativeGetBackgroundColor());
}
/**
@@ -82,7 +83,7 @@ public class BackgroundLayer extends Layer {
*/
@SuppressWarnings("unchecked")
public PropertyValue getBackgroundPattern() {
- return (PropertyValue) new PropertyValue(nativeGetBackgroundPattern());
+ return (PropertyValue) new PropertyValue("background-pattern", nativeGetBackgroundPattern());
}
/**
@@ -92,7 +93,7 @@ public class BackgroundLayer extends Layer {
*/
@SuppressWarnings("unchecked")
public PropertyValue getBackgroundOpacity() {
- return (PropertyValue) new PropertyValue(nativeGetBackgroundOpacity());
+ return (PropertyValue) new PropertyValue("background-opacity", nativeGetBackgroundOpacity());
}
private native Object nativeGetBackgroundColor();
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 f16ab688d..81ac67dfa 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
@@ -1,6 +1,7 @@
-package com.mapbox.mapboxsdk.style.layers;
// This file is generated. Edit android/platform/scripts/generate-style-code.js, then run `make android-style-code`.
+package com.mapbox.mapboxsdk.style.layers;
+
import android.support.annotation.ColorInt;
import android.support.annotation.NonNull;
import android.support.annotation.UiThread;
@@ -96,14 +97,13 @@ public class CircleLayer extends Layer {
return this;
}
-
/**
* Set a property or properties.
*
* @param properties the var-args properties
* @return This
*/
- public CircleLayer withProperties(@NonNull Property>... properties) {
+ public CircleLayer withProperties(@NonNull PropertyValue>... properties) {
setProperties(properties);
return this;
}
@@ -117,7 +117,7 @@ public class CircleLayer extends Layer {
*/
@SuppressWarnings("unchecked")
public PropertyValue getCircleRadius() {
- return (PropertyValue) new PropertyValue(nativeGetCircleRadius());
+ return (PropertyValue) new PropertyValue("circle-radius", nativeGetCircleRadius());
}
/**
@@ -127,7 +127,7 @@ public class CircleLayer extends Layer {
*/
@SuppressWarnings("unchecked")
public PropertyValue getCircleColor() {
- return (PropertyValue) new PropertyValue(nativeGetCircleColor());
+ return (PropertyValue) new PropertyValue("circle-color", nativeGetCircleColor());
}
/**
@@ -154,7 +154,7 @@ public class CircleLayer extends Layer {
*/
@SuppressWarnings("unchecked")
public PropertyValue getCircleBlur() {
- return (PropertyValue) new PropertyValue(nativeGetCircleBlur());
+ return (PropertyValue) new PropertyValue("circle-blur", nativeGetCircleBlur());
}
/**
@@ -164,7 +164,7 @@ public class CircleLayer extends Layer {
*/
@SuppressWarnings("unchecked")
public PropertyValue getCircleOpacity() {
- return (PropertyValue) new PropertyValue(nativeGetCircleOpacity());
+ return (PropertyValue) new PropertyValue("circle-opacity", nativeGetCircleOpacity());
}
/**
@@ -174,7 +174,7 @@ public class CircleLayer extends Layer {
*/
@SuppressWarnings("unchecked")
public PropertyValue getCircleTranslate() {
- return (PropertyValue) new PropertyValue(nativeGetCircleTranslate());
+ return (PropertyValue) new PropertyValue("circle-translate", nativeGetCircleTranslate());
}
/**
@@ -184,7 +184,7 @@ public class CircleLayer extends Layer {
*/
@SuppressWarnings("unchecked")
public PropertyValue getCircleTranslateAnchor() {
- return (PropertyValue) new PropertyValue(nativeGetCircleTranslateAnchor());
+ return (PropertyValue) new PropertyValue("circle-translate-anchor", nativeGetCircleTranslateAnchor());
}
/**
@@ -194,7 +194,7 @@ public class CircleLayer extends Layer {
*/
@SuppressWarnings("unchecked")
public PropertyValue getCirclePitchScale() {
- return (PropertyValue) new PropertyValue(nativeGetCirclePitchScale());
+ return (PropertyValue) new PropertyValue("circle-pitch-scale", nativeGetCirclePitchScale());
}
/**
@@ -204,7 +204,7 @@ public class CircleLayer extends Layer {
*/
@SuppressWarnings("unchecked")
public PropertyValue getCircleStrokeWidth() {
- return (PropertyValue) new PropertyValue(nativeGetCircleStrokeWidth());
+ return (PropertyValue) new PropertyValue("circle-stroke-width", nativeGetCircleStrokeWidth());
}
/**
@@ -214,7 +214,7 @@ public class CircleLayer extends Layer {
*/
@SuppressWarnings("unchecked")
public PropertyValue getCircleStrokeColor() {
- return (PropertyValue) new PropertyValue(nativeGetCircleStrokeColor());
+ return (PropertyValue) new PropertyValue("circle-stroke-color", nativeGetCircleStrokeColor());
}
/**
@@ -241,7 +241,7 @@ public class CircleLayer extends Layer {
*/
@SuppressWarnings("unchecked")
public PropertyValue getCircleStrokeOpacity() {
- return (PropertyValue) new PropertyValue(nativeGetCircleStrokeOpacity());
+ return (PropertyValue) new PropertyValue("circle-stroke-opacity", nativeGetCircleStrokeOpacity());
}
private native Object nativeGetCircleRadius();
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 3f79c9306..7a5eb7673 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
@@ -1,6 +1,7 @@
-package com.mapbox.mapboxsdk.style.layers;
// This file is generated. Edit android/platform/scripts/generate-style-code.js, then run `make android-style-code`.
+package com.mapbox.mapboxsdk.style.layers;
+
import android.support.annotation.ColorInt;
import android.support.annotation.NonNull;
import android.support.annotation.UiThread;
@@ -96,14 +97,13 @@ public class FillLayer extends Layer {
return this;
}
-
/**
* Set a property or properties.
*
* @param properties the var-args properties
* @return This
*/
- public FillLayer withProperties(@NonNull Property>... properties) {
+ public FillLayer withProperties(@NonNull PropertyValue>... properties) {
setProperties(properties);
return this;
}
@@ -117,7 +117,7 @@ public class FillLayer extends Layer {
*/
@SuppressWarnings("unchecked")
public PropertyValue getFillAntialias() {
- return (PropertyValue) new PropertyValue(nativeGetFillAntialias());
+ return (PropertyValue) new PropertyValue("fill-antialias", nativeGetFillAntialias());
}
/**
@@ -127,7 +127,7 @@ public class FillLayer extends Layer {
*/
@SuppressWarnings("unchecked")
public PropertyValue getFillOpacity() {
- return (PropertyValue) new PropertyValue(nativeGetFillOpacity());
+ return (PropertyValue) new PropertyValue("fill-opacity", nativeGetFillOpacity());
}
/**
@@ -137,12 +137,11 @@ public class FillLayer extends Layer {
*/
@SuppressWarnings("unchecked")
public PropertyValue getFillColor() {
- return (PropertyValue) new PropertyValue(nativeGetFillColor());
+ return (PropertyValue) new PropertyValue("fill-color", 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.
+ * 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
@@ -165,7 +164,7 @@ public class FillLayer extends Layer {
*/
@SuppressWarnings("unchecked")
public PropertyValue getFillOutlineColor() {
- return (PropertyValue) new PropertyValue(nativeGetFillOutlineColor());
+ return (PropertyValue) new PropertyValue("fill-outline-color", nativeGetFillOutlineColor());
}
/**
@@ -192,7 +191,7 @@ public class FillLayer extends Layer {
*/
@SuppressWarnings("unchecked")
public PropertyValue getFillTranslate() {
- return (PropertyValue) new PropertyValue(nativeGetFillTranslate());
+ return (PropertyValue) new PropertyValue("fill-translate", nativeGetFillTranslate());
}
/**
@@ -202,7 +201,7 @@ public class FillLayer extends Layer {
*/
@SuppressWarnings("unchecked")
public PropertyValue getFillTranslateAnchor() {
- return (PropertyValue) new PropertyValue(nativeGetFillTranslateAnchor());
+ return (PropertyValue) new PropertyValue("fill-translate-anchor", nativeGetFillTranslateAnchor());
}
/**
@@ -212,7 +211,7 @@ public class FillLayer extends Layer {
*/
@SuppressWarnings("unchecked")
public PropertyValue getFillPattern() {
- return (PropertyValue) new PropertyValue(nativeGetFillPattern());
+ return (PropertyValue) new PropertyValue("fill-pattern", nativeGetFillPattern());
}
private native Object nativeGetFillAntialias();
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/Function.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/Function.java
deleted file mode 100644
index 900fe1047..000000000
--- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/Function.java
+++ /dev/null
@@ -1,137 +0,0 @@
-package com.mapbox.mapboxsdk.style.layers;
-
-import android.support.annotation.FloatRange;
-import android.support.annotation.NonNull;
-import android.support.annotation.Nullable;
-import android.support.annotation.Size;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Functions are used to change properties in relation to the state of the map.
- *
- * Currently, only zoom functions are supported.
- *
- *
- * @param the target property's value type. Make sure it matches.
- * @see The online documentation
- */
-public class Function {
-
- /**
- * A stop represents a certain point in the range of this function
- *
- * @param input
- * @param output
- */
- public static class Stop