diff options
Diffstat (limited to 'platform/android/src/native_map_view.cpp')
-rwxr-xr-x | platform/android/src/native_map_view.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/platform/android/src/native_map_view.cpp b/platform/android/src/native_map_view.cpp index 5418a9e42a..1e2464f1a0 100755 --- a/platform/android/src/native_map_view.cpp +++ b/platform/android/src/native_map_view.cpp @@ -25,7 +25,7 @@ #include <mbgl/util/logging.hpp> #include <mbgl/util/platform.hpp> #include <mbgl/util/projection.hpp> -#include <mbgl/sprite/sprite_image.hpp> +#include <mbgl/style/image.hpp> #include <mbgl/style/filter.hpp> // Java -> C++ conversion @@ -735,12 +735,12 @@ void NativeMapView::addAnnotationIcon(JNIEnv& env, jni::String symbol, jint w, j } jni::GetArrayRegion(env, *jpixels, 0, size, reinterpret_cast<jbyte*>(premultipliedImage.data.get())); - auto iconImage = std::make_shared<mbgl::SpriteImage>(std::move(premultipliedImage), float(scale)); - map->addAnnotationIcon(symbolName, iconImage); + map->addAnnotationImage(symbolName, + std::make_unique<mbgl::style::Image>(std::move(premultipliedImage), float(scale))); } jdouble NativeMapView::getTopOffsetPixelsForAnnotationSymbol(JNIEnv& env, jni::String symbolName) { - return map->getTopOffsetPixelsForAnnotationIcon(jni::Make<std::string>(env, symbolName)); + return map->getTopOffsetPixelsForAnnotationImage(jni::Make<std::string>(env, symbolName)); } jlong NativeMapView::getTransitionDuration(JNIEnv&) { @@ -1036,9 +1036,9 @@ void NativeMapView::addImage(JNIEnv& env, jni::String name, jni::jint w, jni::ji } jni::GetArrayRegion(env, *pixels, 0, size, reinterpret_cast<jbyte*>(premultipliedImage.data.get())); - auto spriteImage = std::make_unique<mbgl::SpriteImage>(std::move(premultipliedImage), float(scale)); - map->addImage(jni::Make<std::string>(env, name), std::move(spriteImage)); + map->addImage(jni::Make<std::string>(env, name), + std::make_unique<mbgl::style::Image>(std::move(premultipliedImage), float(scale))); } void NativeMapView::removeImage(JNIEnv& env, jni::String name) { |