summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Shalamov <alexander.shalamov@mapbox.com>2019-11-04 08:17:06 +0200
committerAlexander Shalamov <alexander.shalamov@mapbox.com>2019-11-11 18:20:01 +0200
commit461460fc8798921bd2efadedbbd800e96c900261 (patch)
treed7102ac7ad69e42752eb54e7c717073985237b9a
parenta86857cb36b270ff29c9203f3fe1516137ebe1ca (diff)
downloadqtlocation-mapboxgl-461460fc8798921bd2efadedbbd800e96c900261.tar.gz
[android] Placeholders for conversion from:to Image
-rw-r--r--platform/android/src/conversion/constant.cpp5
-rw-r--r--platform/android/src/conversion/constant.hpp6
2 files changed, 11 insertions, 0 deletions
diff --git a/platform/android/src/conversion/constant.cpp b/platform/android/src/conversion/constant.cpp
index a409e5dfdf..46a91026df 100644
--- a/platform/android/src/conversion/constant.cpp
+++ b/platform/android/src/conversion/constant.cpp
@@ -52,6 +52,11 @@ Result<jni::Local<jni::Object<>>> Converter<jni::Local<jni::Object<>>, std::vect
return result;
}
+Result<jni::Local<jni::Object<>>> Converter<jni::Local<jni::Object<>>, style::expression::Image>::operator()(
+ jni::JNIEnv& env, const style::expression::Image& value) const {
+ return jni::Make<jni::String>(env, value.id());
+}
+
} // namespace conversion
} // namespace style
} // namespace mbgl
diff --git a/platform/android/src/conversion/constant.hpp b/platform/android/src/conversion/constant.hpp
index 839e6e84dc..a9239fe845 100644
--- a/platform/android/src/conversion/constant.hpp
+++ b/platform/android/src/conversion/constant.hpp
@@ -6,6 +6,7 @@
#include <mbgl/util/enum.hpp>
#include <mbgl/style/expression/formatted.hpp>
+#include <mbgl/style/expression/image.hpp>
#include <jni/jni.hpp>
@@ -99,6 +100,11 @@ struct Converter<jni::Local<jni::Object<>>, std::vector<T>, typename std::enable
}
};
+template <>
+struct Converter<jni::Local<jni::Object<>>, style::expression::Image> {
+ Result<jni::Local<jni::Object<>>> operator()(jni::JNIEnv& env, const style::expression::Image& value) const;
+};
+
} // namespace conversion
} // namespace android
} // namespace mbgl