[android] - add support for sdf by exposing sdf confiigurationn when calling MapboxMap#addImage.

This commit is contained in:
tobrun
2018-06-20 14:18:15 +02:00
committed by Tobrun
parent e1af62e87d
commit 279dd93f7c
7 changed files with 64 additions and 22 deletions

View File

@@ -895,14 +895,16 @@ void NativeMapView::removeSource(JNIEnv& env, jni::Object<Source> obj, jlong sou
source->removeFromMap(env, obj, *map);
}
void NativeMapView::addImage(JNIEnv& env, jni::String name, jni::Object<Bitmap> bitmap, jni::jfloat scale) {
void NativeMapView::addImage(JNIEnv& env, jni::String name, jni::Object<Bitmap> bitmap, jni::jfloat scale, jni::jboolean sdf) {
jni::NullCheck(env, &bitmap);
mbgl::PremultipliedImage premultipliedImage = Bitmap::GetImage(env, bitmap);
map->getStyle().addImage(std::make_unique<mbgl::style::Image>(
jni::Make<std::string>(env, name),
std::move(premultipliedImage),
float(scale)));
float(scale),
sdf)
);
}
void NativeMapView::addImages(JNIEnv& env, jni::Array<jni::Object<mbgl::android::Image>> jimages) {