summaryrefslogtreecommitdiff
path: root/platform/android/src/snapshotter/map_snapshotter.cpp
diff options
context:
space:
mode:
authortobrun <tobrun.van.nuland@gmail.com>2018-05-30 13:28:49 +0200
committerTobrun <tobrun@mapbox.com>2018-05-30 20:23:57 +0200
commit7193a43729b0826f43275842a1e060e907830520 (patch)
tree737ea88f66a756a8b9240021ef4c8329e98baca2 /platform/android/src/snapshotter/map_snapshotter.cpp
parente67f0be81301abce9454c678f677d37d61a03631 (diff)
downloadqtlocation-mapboxgl-7193a43729b0826f43275842a1e060e907830520.tar.gz
[core] [android] - add style json setter/getter to map snapshotter
Diffstat (limited to 'platform/android/src/snapshotter/map_snapshotter.cpp')
-rw-r--r--platform/android/src/snapshotter/map_snapshotter.cpp6
1 files changed, 6 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"),