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

Commit

Permalink
[android] - expose getMap on native_map_view
Browse files Browse the repository at this point in the history
  • Loading branch information
tobrun committed Jul 20, 2018
1 parent e94c623 commit 418bcc2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
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

0 comments on commit 418bcc2

Please sign in to comment.