[android] - expose getMap on native_map_view

This commit is contained in:
Tobrun
2018-07-19 20:20:09 +02:00
committed by Tobrun
parent e94c623e03
commit 418bcc2f21
3 changed files with 7 additions and 1 deletions

View File

@@ -64,7 +64,7 @@ final class NativeMapView {
private boolean destroyed = false;
// Holds the pointer to JNI NativeMapView
private long nativePtr = 0;
long nativePtr = 0;
// Listener invoked to return a bitmap of the map
private MapboxMap.SnapshotReadyCallback snapshotReadyCallback;

View File

@@ -940,6 +940,10 @@ jni::jboolean NativeMapView::getPrefetchesTiles(JNIEnv&) {
return jni::jboolean(map->getPrefetchZoomDelta() > 0);
}
mbgl::Map& NativeMapView::getMap() {
return *map;
}
// Static methods //
jni::Class<NativeMapView> NativeMapView::javaClass;

View File

@@ -248,6 +248,8 @@ public:
jni::jboolean getPrefetchesTiles(JNIEnv&);
mbgl::Map& getMap();
private:
std::unique_ptr<AndroidRendererFrontend> rendererFrontend;