@rnmapbox/maps 10.0.0-beta.40 → 10.0.0-beta.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,102 +0,0 @@
1
- package com.mapbox.rctmgl.components.camera;
2
-
3
- import com.mapbox.geojson.FeatureCollection;
4
- import com.facebook.common.logging.FLog;
5
- import com.facebook.react.bridge.ReactApplicationContext;
6
- import com.facebook.react.bridge.ReadableMap;
7
- import com.facebook.react.uimanager.ThemedReactContext;
8
- import com.facebook.react.uimanager.annotations.ReactProp;
9
- import com.mapbox.rctmgl.components.AbstractEventEmitter;
10
- import com.mapbox.rctmgl.utils.GeoJSONUtils;
11
- //import com.mapbox.rctmgl.utils.GeoJSONUtils;
12
-
13
- import java.util.HashMap;
14
- import java.util.Map;
15
-
16
- public class RCTMGLCameraManager extends AbstractEventEmitter<RCTMGLCamera> {
17
- public static final String REACT_CLASS = "RCTMGLCamera";
18
-
19
- private ReactApplicationContext mContext;
20
-
21
- public RCTMGLCameraManager(ReactApplicationContext context) {
22
- super(context);
23
- mContext = context;
24
- }
25
-
26
- @Override
27
- public Map<String, String> customEvents() {
28
- return new HashMap<>();
29
- }
30
-
31
- @Override
32
- public String getName() {
33
- return REACT_CLASS;
34
- }
35
-
36
- @Override
37
- protected RCTMGLCamera createViewInstance(ThemedReactContext reactContext) {
38
- return new RCTMGLCamera(reactContext, this);
39
- }
40
-
41
- @ReactProp(name="stop")
42
- public void setStop(RCTMGLCamera camera, ReadableMap map) {
43
- if (map != null) {
44
- CameraStop stop = CameraStop.fromReadableMap(mContext, map, null);
45
- camera.setStop(stop);
46
- }
47
- }
48
-
49
- @ReactProp(name="defaultStop")
50
- public void setDefaultStop(RCTMGLCamera camera, ReadableMap map) {
51
- if (map != null) {
52
- CameraStop stop = CameraStop.fromReadableMap(mContext, map, null);
53
- camera.setDefaultStop(stop);
54
- }
55
- }
56
- /*v10todo
57
- @ReactProp(name="maxBounds")
58
- public void setMaxBounds(RCTMGLCamera camera, String value) {
59
- if (value != null) {
60
- FeatureCollection collection = FeatureCollection.fromJson(value);
61
- camera.setMaxBounds(GeoJSONUtils.toLatLngBounds(collection));
62
- }
63
- }
64
- */
65
-
66
- @ReactProp(name="userTrackingMode")
67
- public void setUserTrackingMode(RCTMGLCamera camera, int userTrackingMode) {
68
- camera.setUserTrackingMode(userTrackingMode);
69
- throw new AssertionError("Unused code");
70
- }
71
-
72
- @ReactProp(name="followZoomLevel")
73
- public void setZoomLevel(RCTMGLCamera camera, double zoomLevel) {
74
- camera.setZoomLevel(zoomLevel);
75
- }
76
-
77
- @ReactProp(name="followUserLocation")
78
- public void setFollowUserLocation(RCTMGLCamera camera, boolean value) {
79
- camera.setFollowUserLocation(value);
80
- }
81
-
82
- @ReactProp(name="followUserMode")
83
- public void setFollowUserMode(RCTMGLCamera camera, String value) {
84
- camera.setFollowUserMode(value);
85
- }
86
-
87
- @ReactProp(name="minZoomLevel")
88
- public void setMinZoomLevel(RCTMGLCamera camera, double value) {
89
- camera.setMinZoomLevel(value);
90
- }
91
-
92
- @ReactProp(name="maxZoomLevel")
93
- public void setMaxZoomLevel(RCTMGLCamera camera, double value) {
94
- camera.setMaxZoomLevel(value);
95
- }
96
-
97
- @ReactProp(name="followPitch")
98
- public void setFollowPitch(RCTMGLCamera camera, double value) {
99
- camera.setFollowPitch(value);
100
- }
101
-
102
- }