blob: 38d52972915af3eb9d13856ae6f5b7b63ff59e7c (
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
|
package com.mapbox.mapboxsdk.maps;
import com.mapbox.mapboxsdk.geometry.LatLng;
/**
* Utility class to bypass package visibility
*/
public class MapViewUtils {
public static void setDirection(MapboxMap mapboxMap, float direction) {
mapboxMap.getTransform().setBearing(direction);
}
public static float getDirection(MapboxMap mapboxMap) {
return (float) mapboxMap.getTransform().getBearing();
}
public static void setTilt(MapboxMap mapboxMap, float tilt) {
mapboxMap.getTransform().setTilt((double) tilt);
}
public static float getTilt(MapboxMap mapboxMap) {
return (float) mapboxMap.getTransform().getTilt();
}
public static void setLatLng(MapboxMap mapboxMap, LatLng latLng) {
mapboxMap.getTransform().setCenterCoordinate(latLng);
}
public static LatLng getLatLng(MapboxMap mapboxMap) {
return mapboxMap.getTransform().getCenterCoordinate();
}
}
|