Fix Map with CachingHTTPFileSource

This commit is contained in:
Leith Bade
2014-12-04 08:11:09 +11:00
parent 991a74774e
commit 2b06d905f6
2 changed files with 4 additions and 1 deletions

View File

@@ -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);

View File

@@ -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;