Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Expose getMap #12444

Merged
merged 1 commit into from
Jul 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 4 additions & 0 deletions platform/android/src/native_map_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions platform/android/src/native_map_view.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,8 @@ class NativeMapView : public MapObserver {

jni::jboolean getPrefetchesTiles(JNIEnv&);

mbgl::Map& getMap();

private:
std::unique_ptr<AndroidRendererFrontend> rendererFrontend;

Expand Down