diff options
author | tobrun <tobrun.van.nuland@gmail.com> | 2018-06-26 16:21:16 +0200 |
---|---|---|
committer | Tobrun <tobrun@mapbox.com> | 2018-07-05 18:50:21 +0200 |
commit | 473dd9b23f3bbd933a3af52d896803659f80acfb (patch) | |
tree | 81cdec5e135e36ac67fa3e2890ba0002ec6b3d89 /platform/android/src | |
parent | d4ca3014eb92ca4d7154e57539100413b32b397f (diff) | |
download | qtlocation-mapboxgl-473dd9b23f3bbd933a3af52d896803659f80acfb.tar.gz |
[android] - add LatLng for pixel conversion feature to MapSnapshotter
Diffstat (limited to 'platform/android/src')
-rw-r--r-- | platform/android/src/snapshotter/map_snapshot.cpp | 4 | ||||
-rw-r--r-- | platform/android/src/snapshotter/map_snapshot.hpp | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/platform/android/src/snapshotter/map_snapshot.cpp b/platform/android/src/snapshotter/map_snapshot.cpp index f5092b3c56..bbbf7cc207 100644 --- a/platform/android/src/snapshotter/map_snapshot.cpp +++ b/platform/android/src/snapshotter/map_snapshot.cpp @@ -20,6 +20,9 @@ jni::Object<PointF> MapSnapshot::pixelForLatLng(jni::JNIEnv& env, jni::Object<La return PointF::New(env, point.x * pixelRatio, point.y * pixelRatio); } +jni::Object<LatLng> MapSnapshot::latLngForPixel(jni::JNIEnv& env, jni::Object<PointF>) { + return LatLng::New(env, {0, 0}); +} // Static methods // @@ -52,6 +55,7 @@ void MapSnapshot::registerNative(jni::JNIEnv& env) { std::make_unique<MapSnapshot, JNIEnv&>, "initialize", "finalize", + METHOD(&MapSnapshot::latLngForPixel, "latLngForPixel"), METHOD(&MapSnapshot::pixelForLatLng, "pixelForLatLng") ); } diff --git a/platform/android/src/snapshotter/map_snapshot.hpp b/platform/android/src/snapshotter/map_snapshot.hpp index 4673dcd16e..48dd1b6049 100644 --- a/platform/android/src/snapshotter/map_snapshot.hpp +++ b/platform/android/src/snapshotter/map_snapshot.hpp @@ -34,6 +34,7 @@ public: ~MapSnapshot(); jni::Object<PointF> pixelForLatLng(jni::JNIEnv&, jni::Object<LatLng>); + jni::Object<LatLng> latLngForPixel(jni::JNIEnv&, jni::Object<PointF>); private: static jni::Class<MapSnapshot> javaClass; |