[core] Include pixelRatio property in MapOptions

Move pixelRatio property from Map constructor to MapOptions.
This commit is contained in:
Sudarsana Babu Nagineni
2019-03-27 19:17:04 +02:00
parent f5064e7108
commit 7af00a404f
28 changed files with 107 additions and 74 deletions

View File

@@ -82,13 +82,14 @@ NativeMapView::NativeMapView(jni::JNIEnv& _env,
MapOptions options;
options.withMapMode(MapMode::Continuous)
.withSize(mbgl::Size{ static_cast<uint32_t>(width), static_cast<uint32_t>(height) })
.withPixelRatio(pixelRatio)
.withConstrainMode(ConstrainMode::HeightOnly)
.withViewportMode(ViewportMode::Default)
.withCrossSourceCollisions(_crossSourceCollisions);
// Create the core map
map = std::make_unique<mbgl::Map>(
*rendererFrontend, *this, pixelRatio, *threadPool, options,
*rendererFrontend, *this, *threadPool, options,
mbgl::android::FileSource::getSharedResourceOptions(_env, jFileSource));
}