diff options
Diffstat (limited to 'platform/android/src/snapshotter/map_snapshot.hpp')
-rw-r--r-- | platform/android/src/snapshotter/map_snapshot.hpp | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/platform/android/src/snapshotter/map_snapshot.hpp b/platform/android/src/snapshotter/map_snapshot.hpp new file mode 100644 index 0000000000..6d60d49728 --- /dev/null +++ b/platform/android/src/snapshotter/map_snapshot.hpp @@ -0,0 +1,41 @@ +#pragma once + +#include <mbgl/map/map_snapshotter.hpp> + +#include <jni/jni.hpp> + +#include "../geometry/lat_lng.hpp" +#include "../graphics/pointf.hpp" + +namespace mbgl { +namespace android { + +class MapSnapshot { +public: + + using PointForFn = mbgl::MapSnapshotter::PointForFn; + + static constexpr auto Name() { return "com/mapbox/mapboxsdk/snapshotter/MapSnapshot"; }; + + static void registerNative(jni::JNIEnv&); + + static jni::Object<MapSnapshot> New(JNIEnv& env, + PremultipliedImage&& image, + float pixelRatio, + PointForFn pointForFn); + + MapSnapshot(jni::JNIEnv&) {}; + MapSnapshot(float pixelRatio, PointForFn); + ~MapSnapshot(); + + jni::Object<PointF> pixelForLatLng(jni::JNIEnv&, jni::Object<LatLng>); + +private: + static jni::Class<MapSnapshot> javaClass; + + float pixelRatio; + mbgl::MapSnapshotter::PointForFn pointForFn; +}; + +} // namespace android +} // namespace mbgl
\ No newline at end of file |