diff options
author | Lloyd Sheng <i@lloydsheng.com> | 2018-03-27 13:47:53 +0800 |
---|---|---|
committer | Lloyd Sheng <i@lloydsheng.com> | 2018-03-27 13:47:53 +0800 |
commit | f8039e524e964ccd61721722d4f37460d29d7e5f (patch) | |
tree | 25c62c7153199330b6c0a3cc97767ee1463e02a5 /platform/android/src/geojson/multi_point.cpp | |
parent | ef9bac737fdb6a07ca3b0260459367c776fbffbb (diff) | |
parent | 4f196d48ddfc3bb05dee1cdd032af170a6c53d67 (diff) | |
download | qtlocation-mapboxgl-upstream/llooyd.tar.gz |
Merge branch 'release-boba' into llooydupstream/llooyd
Diffstat (limited to 'platform/android/src/geojson/multi_point.cpp')
-rw-r--r-- | platform/android/src/geojson/multi_point.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/platform/android/src/geojson/multi_point.cpp b/platform/android/src/geojson/multi_point.cpp index 4f9ff596b2..6f62541209 100644 --- a/platform/android/src/geojson/multi_point.cpp +++ b/platform/android/src/geojson/multi_point.cpp @@ -8,6 +8,16 @@ namespace mbgl { namespace android { namespace geojson { +jni::Object<MultiPoint> MultiPoint::New(JNIEnv& env, const mbgl::MultiPoint<double>& multiPoint) { + auto jList = asPointsList(env, multiPoint); + + static auto method = javaClass.GetStaticMethod<jni::Object<MultiPoint>(jni::Object<java::util::List>)>(env, "fromLngLats"); + auto jMultiPoint = javaClass.Call(env, method, jList); + + jni::DeleteLocalRef(env, jList); + return jMultiPoint; +} + mapbox::geojson::multi_point MultiPoint::convert(jni::JNIEnv &env, jni::Object<MultiPoint> jMultiPoint) { mapbox::geojson::multi_point multiPoint; |