diff options
author | Ivo van Dongen <info@ivovandongen.nl> | 2017-10-02 17:22:56 +0300 |
---|---|---|
committer | Fabian Guerra Soto <fabian.guerra@mapbox.com> | 2017-11-01 09:23:53 -0400 |
commit | fd3587608b950df86809606819e89fbe71139ac3 (patch) | |
tree | 1f825b49f527b41f5dba21f3d9b888f5bc782a03 /platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/snapshotter | |
parent | 31873725d7612621792af2258c55ab414b64acb6 (diff) | |
download | qtlocation-mapboxgl-fd3587608b950df86809606819e89fbe71139ac3.tar.gz |
[android] map snapshotter - add mutators
Diffstat (limited to 'platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/snapshotter')
-rw-r--r-- | platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/snapshotter/MapSnapshotter.java | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/snapshotter/MapSnapshotter.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/snapshotter/MapSnapshotter.java index 72df86d80d..8118f9ad92 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/snapshotter/MapSnapshotter.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/snapshotter/MapSnapshotter.java @@ -184,7 +184,7 @@ public class MapSnapshotter { * Starts loading and rendering the snapshot. The callbacks will be fired * on the calling thread. * - * @param callback the callback to use when the snapshot is ready + * @param callback the callback to use when the snapshot is ready * @param errorHandler the error handler to use on snapshot errors */ public void start(@NonNull MapboxMap.SnapshotReadyCallback callback, ErrorHandler errorHandler) { @@ -198,11 +198,41 @@ public class MapSnapshotter { } /** + * Updates the snapshotter with a new size + * + * @param width the width + * @param height the height + */ + public native void setSize(int width, int height); + + /** + * Updates the snapshotter with a new {@link CameraPosition} + * + * @param cameraPosition the camera position + */ + public native void setCameraPosition(CameraPosition cameraPosition); + + /** + * Updates the snapshotter with a new {@link LatLngBounds} + * + * @param region the region + */ + public native void setRegion(LatLngBounds region); + + /** + * Updates the snapshotter with a new style url + * + * @param styleUrl the style url + */ + public native void setStyleUrl(String styleUrl); + + + /** * Must be called in on the thread * the object was created on. */ public void cancel() { - callback = null; + reset(); nativeCancel(); } |