blob: 64090bb48b3a2a25f3ac3ff04279702a3e498898 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
#pragma once
#include <mbgl/map/map_snapshotter.hpp>
#include <jni/jni.hpp>
#include "../geometry/lat_lng.hpp"
#include "../graphics/pointf.hpp"
#include <vector>
#include <string>
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,
std::vector<std::string> attributions,
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
|