@evnydd0sf/react-native-amap3d-fix 3.2.4-fix.1 → 3.2.4-fix.3
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.
package/lib/android/build.gradle
CHANGED
@@ -12,142 +12,142 @@ import qiuxiang.amap3d.toLatLng
|
|
12
12
|
|
13
13
|
@Suppress("unused")
|
14
14
|
internal class MapViewManager : ViewGroupManager<MapView>() {
|
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
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
15
|
+
private val commands = mapOf(
|
16
|
+
"moveCamera" to { view: MapView, args: ReadableArray? -> view.moveCamera(args) },
|
17
|
+
"call" to { view: MapView, args: ReadableArray? -> view.call(args) },
|
18
|
+
)
|
19
|
+
|
20
|
+
override fun getName(): String {
|
21
|
+
return "AMapView"
|
22
|
+
}
|
23
|
+
|
24
|
+
override fun createViewInstance(reactContext: ThemedReactContext): MapView {
|
25
|
+
return MapView(reactContext)
|
26
|
+
}
|
27
|
+
|
28
|
+
override fun onDropViewInstance(view: MapView) {
|
29
|
+
super.onDropViewInstance(view)
|
30
|
+
view.onDestroy()
|
31
|
+
}
|
32
|
+
|
33
|
+
override fun getCommandsMap(): Map<String, Int> {
|
34
|
+
return commands.keys.mapIndexed { index, key -> key to index }.toMap()
|
35
|
+
}
|
36
|
+
|
37
|
+
override fun receiveCommand(view: MapView, command: Int, args: ReadableArray?) {
|
38
|
+
commands.values.toList()[command](view, args)
|
39
|
+
}
|
40
|
+
|
41
|
+
override fun addView(mapView: MapView, child: View, index: Int) {
|
42
|
+
mapView.add(child)
|
43
|
+
super.addView(mapView, child, index)
|
44
|
+
}
|
45
|
+
|
46
|
+
override fun removeViewAt(parent: MapView, index: Int) {
|
47
|
+
parent.remove(parent.getChildAt(index))
|
48
|
+
super.removeViewAt(parent, index)
|
49
|
+
}
|
50
|
+
|
51
|
+
override fun getExportedCustomBubblingEventTypeConstants(): Map<String, Any> {
|
52
|
+
return getEventTypeConstants(
|
53
|
+
"onLoad",
|
54
|
+
"onPress",
|
55
|
+
"onPressPoi",
|
56
|
+
"onLongPress",
|
57
|
+
"onCameraMove",
|
58
|
+
"onCameraIdle",
|
59
|
+
"onLocation",
|
60
|
+
"onCallback",
|
61
|
+
)
|
62
|
+
}
|
63
|
+
|
64
|
+
@ReactProp(name = "initialCameraPosition")
|
65
|
+
fun setInitialCameraPosition(view: MapView, position: ReadableMap) {
|
66
|
+
view.setInitialCameraPosition(position)
|
67
|
+
}
|
68
|
+
|
69
|
+
@ReactProp(name = "myLocationEnabled")
|
70
|
+
fun setMyLocationEnabled(view: MapView, enabled: Boolean) {
|
71
|
+
view.map.isMyLocationEnabled = enabled
|
72
|
+
}
|
73
|
+
|
74
|
+
@ReactProp(name = "indoorViewEnabled")
|
75
|
+
fun setIndoorViewEnabled(view: MapView, enabled: Boolean) {
|
76
|
+
view.map.showIndoorMap(enabled)
|
77
|
+
}
|
78
|
+
|
79
|
+
@ReactProp(name = "buildingsEnabled")
|
80
|
+
fun setBuildingsEnabled(view: MapView, enabled: Boolean) {
|
81
|
+
view.map.showBuildings(enabled)
|
82
|
+
}
|
83
|
+
|
84
|
+
@ReactProp(name = "compassEnabled")
|
85
|
+
fun setCompassEnabled(view: MapView, show: Boolean) {
|
86
|
+
view.map.uiSettings.isCompassEnabled = show
|
87
|
+
}
|
88
|
+
|
89
|
+
@ReactProp(name = "zoomControlsEnabled")
|
90
|
+
fun setZoomControlsEnabled(view: MapView, enabled: Boolean) {
|
91
|
+
view.map.uiSettings.isZoomControlsEnabled = enabled
|
92
|
+
}
|
93
|
+
|
94
|
+
@ReactProp(name = "scaleControlsEnabled")
|
95
|
+
fun setScaleControlsEnabled(view: MapView, enabled: Boolean) {
|
96
|
+
view.map.uiSettings.isScaleControlsEnabled = enabled
|
97
|
+
}
|
98
|
+
|
99
|
+
@ReactProp(name = "language")
|
100
|
+
fun setLanguage(view: MapView, language: String) {
|
101
|
+
view.map.setMapLanguage(language)
|
102
|
+
}
|
103
|
+
|
104
|
+
@ReactProp(name = "myLocationButtonEnabled")
|
105
|
+
fun setMyLocationButtonEnabled(view: MapView, enabled: Boolean) {
|
106
|
+
view.map.uiSettings.isMyLocationButtonEnabled = enabled
|
107
|
+
}
|
108
|
+
|
109
|
+
@ReactProp(name = "trafficEnabled")
|
110
|
+
fun setTrafficEnabled(view: MapView, enabled: Boolean) {
|
111
|
+
view.map.isTrafficEnabled = enabled
|
112
|
+
}
|
113
|
+
|
114
|
+
@ReactProp(name = "maxZoom")
|
115
|
+
fun setMaxZoom(view: MapView, zoomLevel: Float) {
|
116
|
+
view.map.maxZoomLevel = zoomLevel
|
117
|
+
}
|
118
|
+
|
119
|
+
@ReactProp(name = "minZoom")
|
120
|
+
fun setMinZoom(view: MapView, zoomLevel: Float) {
|
121
|
+
view.map.minZoomLevel = zoomLevel
|
122
|
+
}
|
123
|
+
|
124
|
+
@ReactProp(name = "mapType")
|
125
|
+
fun setMapType(view: MapView, mapType: Int) {
|
126
|
+
view.map.mapType = mapType + 1
|
127
|
+
}
|
128
|
+
|
129
|
+
@ReactProp(name = "zoomGesturesEnabled")
|
130
|
+
fun setZoomGesturesEnabled(view: MapView, enabled: Boolean) {
|
131
|
+
view.map.uiSettings.isZoomGesturesEnabled = enabled
|
132
|
+
}
|
133
|
+
|
134
|
+
@ReactProp(name = "scrollGesturesEnabled")
|
135
|
+
fun setScrollGesturesEnabled(view: MapView, enabled: Boolean) {
|
136
|
+
view.map.uiSettings.isScrollGesturesEnabled = enabled
|
137
|
+
}
|
138
|
+
|
139
|
+
@ReactProp(name = "rotateGesturesEnabled")
|
140
|
+
fun setRotateGesturesEnabled(view: MapView, enabled: Boolean) {
|
141
|
+
view.map.uiSettings.isRotateGesturesEnabled = enabled
|
142
|
+
}
|
143
|
+
|
144
|
+
@ReactProp(name = "tiltGesturesEnabled")
|
145
|
+
fun setTiltGesturesEnabled(view: MapView, enabled: Boolean) {
|
146
|
+
view.map.uiSettings.isTiltGesturesEnabled = enabled
|
147
|
+
}
|
148
|
+
|
149
|
+
@ReactProp(name = "cameraPosition")
|
150
|
+
fun setCameraPosition(view: MapView, center: ReadableMap) {
|
151
|
+
view.map.moveCamera(CameraUpdateFactory.changeLatLng(center.toLatLng()))
|
152
|
+
}
|
153
153
|
}
|
package/license
CHANGED
package/package.json
CHANGED