summaryrefslogtreecommitdiff
path: root/platform/android/src/native_map_view.cpp
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2019-03-19 16:57:36 +0200
committerBruno de Oliveira Abinader <bruno@mapbox.com>2019-03-20 21:30:08 +0200
commitd5868d3da822f2bf3297229bd879e76853108a63 (patch)
treeb3d28aab92b938cf541f917f1027d2bbd06d9780 /platform/android/src/native_map_view.cpp
parentd1762d7111b39d45430bd7bb75ea60b7a5d85bd2 (diff)
downloadqtlocation-mapboxgl-d5868d3da822f2bf3297229bd879e76853108a63.tar.gz
[core] Remove file source from public Map ctor
Diffstat (limited to 'platform/android/src/native_map_view.cpp')
-rwxr-xr-xplatform/android/src/native_map_view.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/platform/android/src/native_map_view.cpp b/platform/android/src/native_map_view.cpp
index 3a4e2014ba..1eb4c56728 100755
--- a/platform/android/src/native_map_view.cpp
+++ b/platform/android/src/native_map_view.cpp
@@ -13,6 +13,7 @@
#include <jni/jni.hpp>
+#include <mbgl/map/map.hpp>
#include <mbgl/map/map_options.hpp>
#include <mbgl/math/minmax.hpp>
#include <mbgl/util/constants.hpp>
@@ -74,9 +75,6 @@ NativeMapView::NativeMapView(jni::JNIEnv& _env,
return;
}
- // Get native peer for file source
- mbgl::FileSource& fileSource = mbgl::android::FileSource::getDefaultFileSource(_env, jFileSource);
-
// Create a renderer frontend
rendererFrontend = std::make_unique<AndroidRendererFrontend>(mapRenderer);
@@ -88,10 +86,9 @@ NativeMapView::NativeMapView(jni::JNIEnv& _env,
.withCrossSourceCollisions(_crossSourceCollisions);
// Create the core map
- map = std::make_unique<mbgl::Map>(*rendererFrontend, *this,
- mbgl::Size{ static_cast<uint32_t>(width),
- static_cast<uint32_t>(height) }, pixelRatio,
- fileSource, *threadPool, options);
+ map = std::make_unique<mbgl::Map>(
+ *rendererFrontend, *this, mbgl::Size{ static_cast<uint32_t>(width), static_cast<uint32_t>(height) },
+ pixelRatio, *threadPool, options, mbgl::android::FileSource::getSharedResourceOptions(_env, jFileSource));
}
/**