blob: 4da835a5f1125c1860a238dbb25636d9915bf583 (
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
package com.mapbox.mapboxsdk.snapshotter;
import android.graphics.Bitmap;
import android.graphics.PointF;
import android.support.annotation.Keep;
import android.support.annotation.NonNull;
import com.mapbox.mapboxsdk.geometry.LatLng;
/**
* A completed snapshot.
*
* @see MapSnapshotter
*/
public class MapSnapshot {
@Keep
private long nativePtr = 0;
private Bitmap bitmap;
private String[] attributions;
private boolean showLogo;
/**
* Created from native side
*/
@Keep
private MapSnapshot(long nativePtr, Bitmap bitmap, String[] attributions, boolean showLogo) {
this.nativePtr = nativePtr;
this.bitmap = bitmap;
this.attributions = attributions;
this.showLogo = showLogo;
}
/**
* @return the large
*/
public Bitmap getBitmap() {
return bitmap;
}
/**
* Calculate the point in pixels on the Image from geographical coordinates.
*
* @param latLng the geographical coordinates
* @return the point on the image
*/
@NonNull
@Keep
public native PointF pixelForLatLng(LatLng latLng);
/**
* Calculate geographical coordinates from a point in pixels on the Image
*
* @param pointF the point in pixels
* @return the geographical coordinates
*/
@NonNull
@Keep
public native LatLng latLngForPixel(PointF pointF);
/**
* @return The attributions for the sources of this snapshot.
*/
protected String[] getAttributions() {
return attributions;
}
/**
* @return Flag indicating to show the Mapbox logo.
*/
boolean isShowLogo() {
return showLogo;
}
// Unused, needed for peer binding
@Keep
private native void initialize();
@Keep
protected native void finalize();
}
|