diff options
author | tobrun <tobrun.van.nuland@gmail.com> | 2018-06-26 16:21:16 +0200 |
---|---|---|
committer | tobrun <tobrun.van.nuland@gmail.com> | 2018-06-26 16:21:16 +0200 |
commit | 36defd39910fb4c186b3704eec930ade0800c873 (patch) | |
tree | 6c71efc750d906d1e127bc9c0ae728b75187c6df /platform/android/src/snapshotter | |
parent | 95fd7ee74257fded4a23cf8c06144f276804a04c (diff) | |
download | qtlocation-mapboxgl-36defd39910fb4c186b3704eec930ade0800c873.tar.gz |
[android] - add LatLng for pixel conversion feature to MapSnapshotter
Diffstat (limited to 'platform/android/src/snapshotter')
-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; |