summaryrefslogtreecommitdiff
path: root/platform/android/src
diff options
context:
space:
mode:
Diffstat (limited to 'platform/android/src')
-rw-r--r--platform/android/src/snapshotter/map_snapshotter.cpp6
-rw-r--r--platform/android/src/snapshotter/map_snapshotter.hpp2
2 files changed, 8 insertions, 0 deletions
diff --git a/platform/android/src/snapshotter/map_snapshotter.cpp b/platform/android/src/snapshotter/map_snapshotter.cpp
index ca1307dd16..8c064f5707 100644
--- a/platform/android/src/snapshotter/map_snapshotter.cpp
+++ b/platform/android/src/snapshotter/map_snapshotter.cpp
@@ -107,6 +107,10 @@ void MapSnapshotter::setStyleUrl(JNIEnv& env, jni::String styleURL) {
snapshotter->setStyleURL(jni::Make<std::string>(env, styleURL));
}
+void MapSnapshotter::setStyleJson(JNIEnv& env, jni::String styleJSON) {
+ snapshotter->setStyleJSON(jni::Make<std::string>(env, styleJSON));
+}
+
void MapSnapshotter::setSize(JNIEnv&, jni::jint width, jni::jint height) {
auto size = mbgl::Size { static_cast<uint32_t>(width), static_cast<uint32_t>(height) };
snapshotter->setSize(size);
@@ -121,6 +125,7 @@ void MapSnapshotter::setRegion(JNIEnv& env, jni::Object<LatLngBounds> region) {
snapshotter->setRegion(LatLngBounds::getLatLngBounds(env, region));
}
+
// Private methods //
void MapSnapshotter::activateFilesource(JNIEnv& env) {
@@ -153,6 +158,7 @@ void MapSnapshotter::registerNative(jni::JNIEnv& env) {
"nativeInitialize",
"finalize",
METHOD(&MapSnapshotter::setStyleUrl, "setStyleUrl"),
+ METHOD(&MapSnapshotter::setStyleJson, "setStyleJson"),
METHOD(&MapSnapshotter::setSize, "setSize"),
METHOD(&MapSnapshotter::setCameraPosition, "setCameraPosition"),
METHOD(&MapSnapshotter::setRegion, "setRegion"),
diff --git a/platform/android/src/snapshotter/map_snapshotter.hpp b/platform/android/src/snapshotter/map_snapshotter.hpp
index 33d32e01a1..3be2cb4f6c 100644
--- a/platform/android/src/snapshotter/map_snapshotter.hpp
+++ b/platform/android/src/snapshotter/map_snapshotter.hpp
@@ -44,6 +44,8 @@ public:
void setStyleUrl(JNIEnv&, jni::String styleURL);
+ void setStyleJson(JNIEnv&, jni::String styleJSON);
+
void setSize(JNIEnv&, jni::jint width, jni::jint height);
void setCameraPosition(JNIEnv&, jni::Object<CameraPosition> position);