summaryrefslogtreecommitdiff
path: root/platform/android/src/geojson/point.cpp
diff options
context:
space:
mode:
authorLloyd Sheng <i@lloydsheng.com>2018-03-27 13:47:53 +0800
committerLloyd Sheng <i@lloydsheng.com>2018-03-27 13:47:53 +0800
commitf8039e524e964ccd61721722d4f37460d29d7e5f (patch)
tree25c62c7153199330b6c0a3cc97767ee1463e02a5 /platform/android/src/geojson/point.cpp
parentef9bac737fdb6a07ca3b0260459367c776fbffbb (diff)
parent4f196d48ddfc3bb05dee1cdd032af170a6c53d67 (diff)
downloadqtlocation-mapboxgl-upstream/llooyd.tar.gz
Merge branch 'release-boba' into llooydupstream/llooyd
Diffstat (limited to 'platform/android/src/geojson/point.cpp')
-rw-r--r--platform/android/src/geojson/point.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/platform/android/src/geojson/point.cpp b/platform/android/src/geojson/point.cpp
index e95376cd2e..aa9dc1a7f6 100644
--- a/platform/android/src/geojson/point.cpp
+++ b/platform/android/src/geojson/point.cpp
@@ -7,6 +7,11 @@ namespace mbgl {
namespace android {
namespace geojson {
+jni::Object<Point> Point::New(jni::JNIEnv& env, const mbgl::Point<double>& point) {
+ static auto method = javaClass.GetStaticMethod<jni::Object<Point> (jni::jdouble, jni::jdouble)>(env, "fromLngLat");
+ return javaClass.Call(env, method, point.x, point.y);
+}
+
mapbox::geojson::point Point::convert(jni::JNIEnv &env, jni::Object<Point> jPoint) {
mapbox::geojson::point point;