[android] map snapshots

This commit is contained in:
Ivo van Dongen
2017-09-18 11:31:45 +03:00
committed by Ivo van Dongen
parent 8182b26dfe
commit c17be060fd
7 changed files with 49 additions and 32 deletions

View File

@@ -807,13 +807,6 @@ final class NativeMapView {
return features != null ? Arrays.asList(features) : new ArrayList<Feature>();
}
public void scheduleTakeSnapshot() {
if (isDestroyedOn("scheduleTakeSnapshot")) {
return;
}
nativeTakeSnapshot();
}
public void setApiBaseUrl(String baseUrl) {
if (isDestroyedOn("setApiBaseUrl")) {
return;
@@ -1076,9 +1069,11 @@ final class NativeMapView {
//
void addSnapshotCallback(@NonNull MapboxMap.SnapshotReadyCallback callback) {
if (isDestroyedOn("addSnapshotCallback")) {
return;
}
snapshotReadyCallback = callback;
scheduleTakeSnapshot();
scheduler.requestRender();
nativeTakeSnapshot();
}
}