Fix Map with CachingHTTPFileSource
This commit is contained in:
@@ -88,7 +88,7 @@ void MBGLView::notify_map_change(mbgl::MapChange /* change */, mbgl::timestamp /
|
||||
nativeView.notifyMapChange();
|
||||
}
|
||||
|
||||
NativeMapView::NativeMapView(JNIEnv* env, jobject obj_) : view(*this), map(view) {
|
||||
NativeMapView::NativeMapView(JNIEnv* env, jobject obj_) : view(*this), fileSource(mbgl::platform::defaultCacheDatabase()), map(view, fileSource) {
|
||||
mbgl::Log::Debug(mbgl::Event::Android, "NativeMapView::NativeMapView");
|
||||
|
||||
assert(env != nullptr);
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
#include <mbgl/map/map.hpp>
|
||||
#include <mbgl/map/view.hpp>
|
||||
#include <mbgl/util/noncopyable.hpp>
|
||||
#include <mbgl/platform/default/caching_http_file_source.hpp>
|
||||
|
||||
#include <string>
|
||||
#include <jni.h>
|
||||
#include <android/native_window.h>
|
||||
@@ -74,6 +76,7 @@ private:
|
||||
ANativeWindow* window = nullptr;
|
||||
|
||||
MBGLView view; // Must be before map
|
||||
mbgl::CachingHTTPFileSource fileSource;
|
||||
mbgl::Map map;
|
||||
|
||||
EGLDisplay display = EGL_NO_DISPLAY;
|
||||
|
||||
Reference in New Issue
Block a user