diff options
author | Ivo van Dongen <info@ivovandongen.nl> | 2017-01-17 17:43:49 +0200 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2017-02-02 09:44:42 -0800 |
commit | f562ecdfc3a08f7b9b0c2be938f237852a82d374 (patch) | |
tree | 71c3ceb4b2a877d124f4b069fa80156d701a6125 /platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/CameraFunction.java | |
parent | 8a5bff8ee630673c6ebc496322eab94a41ae9353 (diff) | |
download | qtlocation-mapboxgl-f562ecdfc3a08f7b9b0c2be938f237852a82d374.tar.gz |
[android] data driven style implementation
Diffstat (limited to 'platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/CameraFunction.java')
-rw-r--r-- | platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/functions/CameraFunction.java | 50 |
1 files changed, 50 insertions, 0 deletions
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 0000000000..bb87fe8a39 --- /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) + * <p> + * 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 <I> the input type + * @param <O> the output type + * @see Function#zoom + */ +public class CameraFunction<I extends Number, O> extends Function<I, O> { + + /** + * Create an exponential camera function + * + * @param stops @see {@link com.mapbox.mapboxsdk.style.functions.stops.Stops#exponential(float, Stop[])} + */ + CameraFunction(@NonNull ExponentialStops<I, O> stops) { + super(stops); + } + + /** + * Create an interval camera function + * + * @param stops @see {@link com.mapbox.mapboxsdk.style.functions.stops.Stops#interval(Stop[])} + */ + CameraFunction(@NonNull IntervalStops<I, O> stops) { + super(stops); + } + + /** + * JNI constructor + */ + @Keep + private CameraFunction(Stops<I, O> stops) { + super(stops); + } +} |