react-native-map4d-map-dtqg 0.1.3 → 0.1.4
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/LICENSE +21 -21
- package/README.md +133 -133
- package/android/.gradle/8.9/checksums/checksums.lock +0 -0
- package/android/.gradle/8.9/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
- package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/8.9/gc.properties +0 -0
- package/android/.gradle/9.2.0/checksums/checksums.lock +0 -0
- package/android/.gradle/9.2.0/fileChanges/last-build.bin +0 -0
- package/android/.gradle/9.2.0/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/9.2.0/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/9.2.0/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/build.gradle +60 -60
- package/android/src/main/AndroidManifest.xml +4 -4
- package/android/src/main/java/com/reactnativemap4dmap/ImageUtils.java +87 -87
- package/android/src/main/java/com/reactnativemap4dmap/Map4dMapModule.java +298 -298
- package/android/src/main/java/com/reactnativemap4dmap/Map4dMapPackage.java +35 -35
- package/android/src/main/java/com/reactnativemap4dmap/Map4dMapViewManager.java +31 -31
- package/android/src/main/java/com/reactnativemap4dmap/RMFBuilding.java +167 -167
- package/android/src/main/java/com/reactnativemap4dmap/RMFBuildingManager.java +121 -121
- package/android/src/main/java/com/reactnativemap4dmap/RMFCircle.java +105 -105
- package/android/src/main/java/com/reactnativemap4dmap/RMFCircleManager.java +121 -121
- package/android/src/main/java/com/reactnativemap4dmap/RMFDirectionsRenderer.java +502 -502
- package/android/src/main/java/com/reactnativemap4dmap/RMFDirectionsRendererManager.java +143 -143
- package/android/src/main/java/com/reactnativemap4dmap/RMFFeature.java +17 -17
- package/android/src/main/java/com/reactnativemap4dmap/RMFMapView.java +1172 -1172
- package/android/src/main/java/com/reactnativemap4dmap/RMFMapViewManager.java +231 -231
- package/android/src/main/java/com/reactnativemap4dmap/RMFMarker.java +412 -412
- package/android/src/main/java/com/reactnativemap4dmap/RMFMarkerManager.java +211 -211
- package/android/src/main/java/com/reactnativemap4dmap/RMFPOI.java +222 -222
- package/android/src/main/java/com/reactnativemap4dmap/RMFPOIManager.java +119 -119
- package/android/src/main/java/com/reactnativemap4dmap/RMFPolygon.java +172 -172
- package/android/src/main/java/com/reactnativemap4dmap/RMFPolygonManager.java +147 -147
- package/android/src/main/java/com/reactnativemap4dmap/RMFPolyline.java +146 -146
- package/android/src/main/java/com/reactnativemap4dmap/RMFPolylineManager.java +137 -137
- package/android/src/main/java/com/reactnativemap4dmap/RMFTileOverlay.java +95 -95
- package/android/src/main/java/com/reactnativemap4dmap/RMFTileOverlayManager.java +64 -64
- package/android/src/main/java/com/reactnativemap4dmap/SizeReportingShadowNode.java +31 -31
- package/android/src/main/java/com/reactnativemap4dmap/ViewAttacherGroup.java +31 -31
- package/android/src/main/java/com/reactnativemap4dmap/ViewChangesTracker.java +70 -70
- package/android/src/main/java/vn/map4d/map/annotations/RMFBitmapDescriptor.java +9 -9
- package/ios/Map4dMap.h +7 -7
- package/ios/Map4dMap.m +14 -14
- package/ios/Map4dMapViewManager.m +34 -34
- package/ios/RCTConvert+Map4dMap.h +33 -33
- package/ios/RCTConvert+Map4dMap.m +112 -112
- package/ios/RMFCircle.h +37 -37
- package/ios/RMFCircle.m +100 -100
- package/ios/RMFCircleManager.h +18 -18
- package/ios/RMFCircleManager.m +155 -155
- package/ios/RMFCircleMap4d.h +23 -23
- package/ios/RMFCircleMap4d.m +13 -13
- package/ios/RMFCoordinate.h +22 -22
- package/ios/RMFCoordinate.m +13 -13
- package/ios/RMFDirectionsMarkerOptions.h +24 -24
- package/ios/RMFDirectionsMarkerOptions.m +23 -23
- package/ios/RMFDirectionsRenderer.h +47 -47
- package/ios/RMFDirectionsRenderer.m +182 -182
- package/ios/RMFDirectionsRendererManager.h +17 -17
- package/ios/RMFDirectionsRendererManager.m +84 -84
- package/ios/RMFDirectionsRendererMap4d.h +21 -21
- package/ios/RMFDirectionsRendererMap4d.m +12 -12
- package/ios/RMFDummyView.h +6 -6
- package/ios/RMFDummyView.m +12 -12
- package/ios/RMFEventResponse.h +39 -39
- package/ios/RMFEventResponse.m +98 -98
- package/ios/RMFIcon.h +24 -24
- package/ios/RMFIcon.m +35 -35
- package/ios/RMFMapView.h +84 -84
- package/ios/RMFMapView.m +376 -376
- package/ios/RMFMapViewManager.h +17 -17
- package/ios/RMFMapViewManager.m +509 -509
- package/ios/RMFMarker.h +57 -57
- package/ios/RMFMarker.m +267 -267
- package/ios/RMFMarkerManager.h +17 -17
- package/ios/RMFMarkerManager.m +156 -156
- package/ios/RMFMarkerMap4d.h +19 -19
- package/ios/RMFMarkerMap4d.m +13 -13
- package/ios/RMFPOI.h +38 -38
- package/ios/RMFPOI.m +123 -123
- package/ios/RMFPOIManager.h +18 -18
- package/ios/RMFPOIManager.m +168 -168
- package/ios/RMFPOIMap4d.h +22 -22
- package/ios/RMFPOIMap4d.m +12 -12
- package/ios/RMFPolygon.h +41 -41
- package/ios/RMFPolygon.m +106 -106
- package/ios/RMFPolygonManager.h +18 -18
- package/ios/RMFPolygonManager.m +141 -141
- package/ios/RMFPolygonMap4d.h +23 -23
- package/ios/RMFPolygonMap4d.m +15 -15
- package/ios/RMFPolyline.h +38 -38
- package/ios/RMFPolyline.m +101 -101
- package/ios/RMFPolylineManager.h +18 -18
- package/ios/RMFPolylineManager.m +139 -139
- package/ios/RMFPolylineMap4d.h +22 -22
- package/ios/RMFPolylineMap4d.m +15 -15
- package/ios/building/RMFBuilding.h +41 -41
- package/ios/building/RMFBuilding.m +104 -104
- package/ios/building/RMFBuildingManager.h +19 -19
- package/ios/building/RMFBuildingManager.m +133 -133
- package/ios/building/RMFBuildingMap4d.h +23 -23
- package/ios/building/RMFBuildingMap4d.m +15 -15
- package/ios/overlays/RMFTileOverlay.h +36 -36
- package/ios/overlays/RMFTileOverlay.m +64 -64
- package/ios/overlays/RMFTileOverlayManager.h +17 -17
- package/ios/overlays/RMFTileOverlayManager.m +27 -27
- package/lib/commonjs/components/MFBanDoSo.js.map +1 -1
- package/lib/commonjs/components/MFBuilding.js +50 -32
- package/lib/commonjs/components/MFBuilding.js.map +1 -1
- package/lib/commonjs/components/MFCircle.js +44 -26
- package/lib/commonjs/components/MFCircle.js.map +1 -1
- package/lib/commonjs/components/MFDirectionsRenderer.js +56 -38
- package/lib/commonjs/components/MFDirectionsRenderer.js.map +1 -1
- package/lib/commonjs/components/MFMapView.js +91 -74
- package/lib/commonjs/components/MFMapView.js.map +1 -1
- package/lib/commonjs/components/MFMarker.js +59 -41
- package/lib/commonjs/components/MFMarker.js.map +1 -1
- package/lib/commonjs/components/MFPOI.js +44 -26
- package/lib/commonjs/components/MFPOI.js.map +1 -1
- package/lib/commonjs/components/MFPolygon.js +46 -28
- package/lib/commonjs/components/MFPolygon.js.map +1 -1
- package/lib/commonjs/components/MFPolyline.js +42 -24
- package/lib/commonjs/components/MFPolyline.js.map +1 -1
- package/lib/commonjs/components/MFTileOverlay.js +9 -9
- package/lib/commonjs/components/MFTileOverlay.js.map +1 -1
- package/lib/commonjs/components/Map4dMapView.js.map +1 -1
- package/lib/commonjs/components/extends/AreaFocusManager.js +16 -16
- package/lib/commonjs/components/extends/AreaFocusManager.js.map +1 -1
- package/lib/commonjs/components/extends/AreaFocuser.js +2 -2
- package/lib/commonjs/components/extends/AreaFocuser.js.map +1 -1
- package/lib/commonjs/components/extends/BoundHelper.js.map +1 -1
- package/lib/commonjs/components/extends/area/AreaFocusAreas.js.map +1 -1
- package/lib/commonjs/components/extends/area/AreaFocusGeometryUtils.js.map +1 -1
- package/lib/commonjs/components/extends/area/AreaFocusSession.js.map +1 -1
- package/lib/commonjs/components/extends/area/AreaFocusTypes.js +18 -18
- package/lib/commonjs/components/extends/area/AreaFocusTypes.js.map +1 -1
- package/lib/commonjs/components/internal/DefaultRoadmapStyle.js.map +1 -1
- package/lib/commonjs/components/internal/GeojsonStyleUtils.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/components/MFBanDoSo.js.map +1 -1
- package/lib/module/components/MFBuilding.js +51 -33
- package/lib/module/components/MFBuilding.js.map +1 -1
- package/lib/module/components/MFCircle.js +45 -27
- package/lib/module/components/MFCircle.js.map +1 -1
- package/lib/module/components/MFDirectionsRenderer.js +57 -39
- package/lib/module/components/MFDirectionsRenderer.js.map +1 -1
- package/lib/module/components/MFMapView.js +92 -75
- package/lib/module/components/MFMapView.js.map +1 -1
- package/lib/module/components/MFMarker.js +60 -42
- package/lib/module/components/MFMarker.js.map +1 -1
- package/lib/module/components/MFPOI.js +45 -27
- package/lib/module/components/MFPOI.js.map +1 -1
- package/lib/module/components/MFPolygon.js +47 -29
- package/lib/module/components/MFPolygon.js.map +1 -1
- package/lib/module/components/MFPolyline.js +43 -25
- package/lib/module/components/MFPolyline.js.map +1 -1
- package/lib/module/components/MFTileOverlay.js +9 -9
- package/lib/module/components/MFTileOverlay.js.map +1 -1
- package/lib/module/components/Map4dMapView.js.map +1 -1
- package/lib/module/components/extends/AreaFocusManager.js +16 -16
- package/lib/module/components/extends/AreaFocusManager.js.map +1 -1
- package/lib/module/components/extends/AreaFocuser.js +2 -2
- package/lib/module/components/extends/AreaFocuser.js.map +1 -1
- package/lib/module/components/extends/BoundHelper.js.map +1 -1
- package/lib/module/components/extends/area/AreaFocusAreas.js.map +1 -1
- package/lib/module/components/extends/area/AreaFocusGeometryUtils.js.map +1 -1
- package/lib/module/components/extends/area/AreaFocusSession.js.map +1 -1
- package/lib/module/components/extends/area/AreaFocusTypes.js +18 -18
- package/lib/module/components/extends/area/AreaFocusTypes.js.map +1 -1
- package/lib/module/components/internal/DefaultRoadmapStyle.js.map +1 -1
- package/lib/module/components/internal/GeojsonStyleUtils.js.map +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/components/Map4dMapView.d.ts +7 -7
- package/package.json +152 -152
- package/react-native-map4d-map.podspec +20 -20
- package/src/components/MFBanDoSo.js +124 -124
- package/src/components/MFBuilding.js +200 -187
- package/src/components/MFCircle.js +186 -173
- package/src/components/MFDirectionsRenderer.js +250 -237
- package/src/components/MFMapView.js +480 -464
- package/src/components/MFMarker.js +259 -246
- package/src/components/MFPOI.js +197 -184
- package/src/components/MFPolygon.js +199 -186
- package/src/components/MFPolyline.js +185 -172
- package/src/components/MFTileOverlay.js +45 -45
- package/src/components/Map4dMapView.tsx +26 -26
- package/src/components/extends/AreaFocusManager.js +196 -196
- package/src/components/extends/AreaFocuser.js +61 -61
- package/src/components/extends/BoundHelper.js +31 -31
- package/src/components/extends/area/AreaFocusAreas.js +164 -164
- package/src/components/extends/area/AreaFocusGeometryUtils.js +164 -164
- package/src/components/extends/area/AreaFocusSession.js +100 -100
- package/src/components/extends/area/AreaFocusTypes.js +36 -36
- package/src/components/internal/DefaultRoadmapStyle.js +3365 -3365
- package/src/components/internal/GeojsonStyleUtils.js +143 -143
- package/src/index.js +25 -25
|
@@ -3,62 +3,62 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { ViewPropTypes } from 'deprecated-react-native-prop-types';
|
|
6
|
-
import { requireNativeComponent, StyleSheet, Platform, Image, NativeModules, findNodeHandle } from 'react-native'; // if ViewPropTypes is not defined fall back to View.propType (to support RN < 0.44)
|
|
6
|
+
import { requireNativeComponent, StyleSheet, Platform, Image, UIManager, NativeModules, findNodeHandle } from 'react-native'; // if ViewPropTypes is not defined fall back to View.propType (to support RN < 0.44)
|
|
7
7
|
|
|
8
8
|
const viewPropTypes = ViewPropTypes || View.propTypes;
|
|
9
9
|
const propTypes = { ...viewPropTypes,
|
|
10
10
|
|
|
11
|
-
/**
|
|
12
|
-
* The coordinate for the marker.
|
|
11
|
+
/**
|
|
12
|
+
* The coordinate for the marker.
|
|
13
13
|
*/
|
|
14
14
|
coordinate: PropTypes.shape({
|
|
15
15
|
latitude: PropTypes.number.isRequired,
|
|
16
16
|
longitude: PropTypes.number.isRequired
|
|
17
17
|
}).isRequired,
|
|
18
18
|
|
|
19
|
-
/**
|
|
20
|
-
* Default value is `false`
|
|
19
|
+
/**
|
|
20
|
+
* Default value is `false`
|
|
21
21
|
*/
|
|
22
22
|
draggable: PropTypes.bool,
|
|
23
23
|
|
|
24
|
-
/**
|
|
25
|
-
* Sets the ground anchor point for the marker.
|
|
24
|
+
/**
|
|
25
|
+
* Sets the ground anchor point for the marker.
|
|
26
26
|
*/
|
|
27
27
|
anchor: PropTypes.shape({
|
|
28
28
|
x: PropTypes.number.isRequired,
|
|
29
29
|
y: PropTypes.number.isRequired
|
|
30
30
|
}),
|
|
31
31
|
|
|
32
|
-
/**
|
|
33
|
-
*
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
34
|
*/
|
|
35
35
|
elevation: PropTypes.number,
|
|
36
36
|
|
|
37
|
-
/**
|
|
38
|
-
*
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
39
|
*/
|
|
40
40
|
rotation: PropTypes.number,
|
|
41
41
|
|
|
42
|
-
/**
|
|
43
|
-
* Sets the infor window anchor point for the marker.
|
|
42
|
+
/**
|
|
43
|
+
* Sets the infor window anchor point for the marker.
|
|
44
44
|
*/
|
|
45
45
|
infoWindowAnchor: PropTypes.shape({
|
|
46
46
|
x: PropTypes.number.isRequired,
|
|
47
47
|
y: PropTypes.number.isRequired
|
|
48
48
|
}),
|
|
49
49
|
|
|
50
|
-
/**
|
|
51
|
-
* The title of the marker.
|
|
50
|
+
/**
|
|
51
|
+
* The title of the marker.
|
|
52
52
|
*/
|
|
53
53
|
title: PropTypes.string,
|
|
54
54
|
|
|
55
|
-
/**
|
|
56
|
-
* The snippet of the marker.
|
|
55
|
+
/**
|
|
56
|
+
* The snippet of the marker.
|
|
57
57
|
*/
|
|
58
58
|
snippet: PropTypes.string,
|
|
59
59
|
|
|
60
|
-
/**
|
|
61
|
-
* Marker icon to render.
|
|
60
|
+
/**
|
|
61
|
+
* Marker icon to render.
|
|
62
62
|
*/
|
|
63
63
|
icon: PropTypes.shape({
|
|
64
64
|
uri: PropTypes.any.isRequired,
|
|
@@ -66,44 +66,44 @@ const propTypes = { ...viewPropTypes,
|
|
|
66
66
|
height: PropTypes.number.isRequired
|
|
67
67
|
}),
|
|
68
68
|
|
|
69
|
-
/**
|
|
70
|
-
* zIndex
|
|
69
|
+
/**
|
|
70
|
+
* zIndex
|
|
71
71
|
*/
|
|
72
72
|
zIndex: PropTypes.number,
|
|
73
73
|
|
|
74
|
-
/**
|
|
75
|
-
* visible
|
|
74
|
+
/**
|
|
75
|
+
* visible
|
|
76
76
|
*/
|
|
77
77
|
visible: PropTypes.bool,
|
|
78
78
|
|
|
79
|
-
/**
|
|
80
|
-
* userData
|
|
79
|
+
/**
|
|
80
|
+
* userData
|
|
81
81
|
*/
|
|
82
82
|
userData: PropTypes.object,
|
|
83
83
|
|
|
84
|
-
/**
|
|
85
|
-
* Callback that is called when the user presses on the marker
|
|
84
|
+
/**
|
|
85
|
+
* Callback that is called when the user presses on the marker
|
|
86
86
|
*/
|
|
87
87
|
onPress: PropTypes.func,
|
|
88
88
|
|
|
89
|
-
/**
|
|
90
|
-
* Callback that is called when the user presses on the info window
|
|
89
|
+
/**
|
|
90
|
+
* Callback that is called when the user presses on the info window
|
|
91
91
|
*/
|
|
92
92
|
onPressInfoWindow: PropTypes.func,
|
|
93
93
|
|
|
94
|
-
/**
|
|
95
|
-
* Callback that is called when the user initiates a drag on this marker (if it is draggable)
|
|
94
|
+
/**
|
|
95
|
+
* Callback that is called when the user initiates a drag on this marker (if it is draggable)
|
|
96
96
|
*/
|
|
97
97
|
onDragStart: PropTypes.func,
|
|
98
98
|
|
|
99
|
-
/**
|
|
100
|
-
* Callback called continuously as the marker is dragged
|
|
99
|
+
/**
|
|
100
|
+
* Callback called continuously as the marker is dragged
|
|
101
101
|
*/
|
|
102
102
|
onDrag: PropTypes.func,
|
|
103
103
|
|
|
104
|
-
/**
|
|
105
|
-
* Callback that is called when a drag on this marker finishes. This is usually the point you
|
|
106
|
-
* will want to setState on the marker's coordinate again
|
|
104
|
+
/**
|
|
105
|
+
* Callback that is called when a drag on this marker finishes. This is usually the point you
|
|
106
|
+
* will want to setState on the marker's coordinate again
|
|
107
107
|
*/
|
|
108
108
|
onDragEnd: PropTypes.func
|
|
109
109
|
};
|
|
@@ -162,8 +162,20 @@ class MFMarker extends React.Component {
|
|
|
162
162
|
_runCommand(name, args) {
|
|
163
163
|
switch (Platform.OS) {
|
|
164
164
|
case 'android':
|
|
165
|
-
|
|
166
|
-
|
|
165
|
+
{
|
|
166
|
+
if (!UIManager || typeof UIManager.dispatchViewManagerCommand !== 'function') {
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
const commandId = this._uiManagerCommand(name);
|
|
171
|
+
|
|
172
|
+
if (commandId == null) {
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
UIManager.dispatchViewManagerCommand(this._getHandle(), commandId, args);
|
|
177
|
+
break;
|
|
178
|
+
}
|
|
167
179
|
|
|
168
180
|
case 'ios':
|
|
169
181
|
//this.getMapManagerCommand(name)(this._getHandle(), ...args);
|
|
@@ -177,16 +189,22 @@ class MFMarker extends React.Component {
|
|
|
177
189
|
}
|
|
178
190
|
|
|
179
191
|
_uiManagerCommand(name) {
|
|
180
|
-
const
|
|
192
|
+
const uiManager = UIManager || NativeModules.UIManager;
|
|
181
193
|
const componentName = "RMFMarker";
|
|
182
194
|
|
|
183
|
-
if (!
|
|
195
|
+
if (!uiManager) {
|
|
196
|
+
return null;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
if (!uiManager.getViewManagerConfig) {
|
|
184
200
|
// RN < 0.58
|
|
185
|
-
|
|
201
|
+
const legacyConfig = uiManager[componentName];
|
|
202
|
+
return legacyConfig && legacyConfig.Commands ? legacyConfig.Commands[name] : null;
|
|
186
203
|
} // RN >= 0.58
|
|
187
204
|
|
|
188
205
|
|
|
189
|
-
|
|
206
|
+
const config = uiManager.getViewManagerConfig(componentName);
|
|
207
|
+
return config && config.Commands ? config.Commands[name] : null;
|
|
190
208
|
}
|
|
191
209
|
|
|
192
210
|
_mapManagerCommand(name) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["PropTypes","React","ViewPropTypes","requireNativeComponent","StyleSheet","Platform","Image","NativeModules","findNodeHandle","viewPropTypes","View","propTypes","coordinate","shape","latitude","number","isRequired","longitude","draggable","bool","anchor","x","y","elevation","rotation","infoWindowAnchor","title","string","snippet","icon","uri","any","width","height","zIndex","visible","userData","object","onPress","func","onPressInfoWindow","onDragStart","onDrag","onDragEnd","MFMarker","Component","constructor","props","_onPress","bind","_ref","setCoordinate","location","_runCommand","setRotation","setTitle","setSnippet","setDraggable","setZIndex","setVisible","setInfoWindowAnchor","setElevation","setUserData","_getHandle","marker","name","args","OS","UIManager","dispatchViewManagerCommand","_uiManagerCommand","_mapManagerCommand","componentName","getViewManagerConfig","Commands","event","stopPropagation","ref","render","resolveAssetSource","styles","style","RMFMarker","create","position"],"sources":["MFMarker.js"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\nimport {ViewPropTypes} from 'deprecated-react-native-prop-types';\nimport {\n requireNativeComponent,\n StyleSheet,\n Platform,\n Image,\n NativeModules,\n findNodeHandle\n} from 'react-native';\n\n// if ViewPropTypes is not defined fall back to View.propType (to support RN < 0.44)\nconst viewPropTypes = ViewPropTypes || View.propTypes;\n\nconst propTypes = {\n ...viewPropTypes,\n\n /**\n * The coordinate for the marker.\n */\n coordinate: PropTypes.shape({\n latitude: PropTypes.number.isRequired,\n longitude: PropTypes.number.isRequired,\n }).isRequired,\n\n /**\n * Default value is `false`\n */\n draggable: PropTypes.bool,\n\n /**\n * Sets the ground anchor point for the marker.\n */\n anchor: PropTypes.shape({\n x: PropTypes.number.isRequired,\n y: PropTypes.number.isRequired,\n }),\n\n /**\n * \n */\n elevation: PropTypes.number,\n\n /**\n * \n */\n rotation: PropTypes.number,\n\n /**\n * Sets the infor window anchor point for the marker.\n */\n infoWindowAnchor: PropTypes.shape({\n x: PropTypes.number.isRequired,\n y: PropTypes.number.isRequired,\n }),\n\n /**\n * The title of the marker.\n */\n title: PropTypes.string,\n\n /**\n * The snippet of the marker.\n */\n snippet: PropTypes.string,\n\n /**\n * Marker icon to render.\n */\n icon: PropTypes.shape({\n uri: PropTypes.any.isRequired,\n width: PropTypes.number.isRequired,\n height: PropTypes.number.isRequired,\n }),\n\n\n /**\n * zIndex\n */\n zIndex: PropTypes.number,\n\n /**\n * visible\n */\n visible: PropTypes.bool,\n\n /**\n * userData\n */\n userData:PropTypes.object,\n\n /**\n * Callback that is called when the user presses on the marker\n */\n onPress: PropTypes.func,\n\n /**\n * Callback that is called when the user presses on the info window\n */\n onPressInfoWindow: PropTypes.func,\n\n /**\n * Callback that is called when the user initiates a drag on this marker (if it is draggable)\n */\n onDragStart: PropTypes.func,\n\n /**\n * Callback called continuously as the marker is dragged\n */\n onDrag: PropTypes.func,\n\n /**\n * Callback that is called when a drag on this marker finishes. This is usually the point you\n * will want to setState on the marker's coordinate again\n */\n onDragEnd: PropTypes.func,\n};\n\n\nclass MFMarker extends React.Component {\n constructor(props) {\n super(props); \n this._onPress = this._onPress.bind(this)\n this._ref = this._ref.bind(this)\n }\n\n setCoordinate(location) {\n this._runCommand(\"setCoordinate\", [location])\n }\n\n setRotation(rotation) {\n this._runCommand(\"setRotation\", [rotation])\n }\n\n setTitle(title) {\n this._runCommand(\"setTitle\", [title])\n }\n\n setSnippet(snippet) {\n this._runCommand(\"setSnippet\", [snippet])\n }\n\n setDraggable(draggable) {\n this._runCommand(\"setDraggable\", [draggable])\n }\n\n setZIndex(zIndex) {\n this._runCommand(\"setZIndex\", [zIndex])\n }\n\n setVisible(visible) {\n this._runCommand(\"setVisible\", [visible])\n }\n\n setInfoWindowAnchor(anchor) {\n this._runCommand(\"setInfoWindowAnchor\", [anchor])\n }\n\n setElevation(elevation) {\n this._runCommand(\"setElevation\", [elevation])\n }\n\n setUserData(userData) {\n this._runCommand(\"setUserData\", [userData])\n }\n\n _getHandle() {\n return findNodeHandle(this.marker);\n }\n\n\n _runCommand(name, args) {\n switch (Platform.OS) {\n case 'android':\n NativeModules.UIManager.dispatchViewManagerCommand(\n this._getHandle(),\n this._uiManagerCommand(name),\n args\n );\n break;\n \n case 'ios':\n //this.getMapManagerCommand(name)(this._getHandle(), ...args);\n this._mapManagerCommand(name)(this._getHandle(), ...args);\n break;\n \n default:\n break;\n }\n }\n\n _uiManagerCommand(name) {\n const UIManager = NativeModules.UIManager;\n const componentName = \"RMFMarker\";\n \n if (!UIManager.getViewManagerConfig) {\n // RN < 0.58\n return UIManager[componentName].Commands[name];\n }\n \n // RN >= 0.58 \n return UIManager.getViewManagerConfig(componentName).Commands[name];\n }\n \n _mapManagerCommand(name) {\n return NativeModules[`RMFMarker`][name];\n }\n\n _onPress(event) {\n event.stopPropagation();\n if (this.props.onPress) {\n this.props.onPress(event);\n }\n }\n\n _ref(ref) {\n this.marker = ref;\n }\n\n render() {\n let icon = {};\n if (this.props.icon) {\n let uri = Image.resolveAssetSource(this.props.icon.uri) || {uri: this.props.icon.uri};\n icon = {uri: uri.uri, width: this.props.icon.width, height: this.props.icon.height}\n }\n return <RMFMarker\n {...this.props}\n icon={icon}\n ref={this._ref}\n style={[styles.marker, this.props.style]}\n onPress={this._onPress}\n />;\n }\n}\n\nMFMarker.propTypes = propTypes;\nvar RMFMarker = requireNativeComponent(`RMFMarker`, MFMarker);\n\nconst styles = StyleSheet.create({\n marker: {\n position: 'absolute'\n },\n});\n\nexport {MFMarker}\n"],"mappings":";;AAAA,OAAOA,SAAP,MAAsB,YAAtB;AACA,OAAOC,KAAP,MAAkB,OAAlB;AACA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AAO,EAAE,KAAKjC;IALT,GAAP;EAOD;;AAjHgC;;AAoHvCJ,QAAQ,CAACjC,SAAT,GAAqBA,SAArB;AACA,IAAIuE,SAAS,GAAG/E,sBAAsB,CAAE,WAAF,EAAcyC,QAAd,CAAtC;AAEA,MAAMoC,MAAM,GAAG5E,UAAU,CAAC+E,MAAX,CAAkB;EAC/BnB,MAAM,EAAE;IACNoB,QAAQ,EAAE;EADJ;AADuB,CAAlB,CAAf;AAMA,SAAQxC,QAAR"}
|
|
1
|
+
{"version":3,"names":["PropTypes","React","ViewPropTypes","requireNativeComponent","StyleSheet","Platform","Image","UIManager","NativeModules","findNodeHandle","viewPropTypes","View","propTypes","coordinate","shape","latitude","number","isRequired","longitude","draggable","bool","anchor","x","y","elevation","rotation","infoWindowAnchor","title","string","snippet","icon","uri","any","width","height","zIndex","visible","userData","object","onPress","func","onPressInfoWindow","onDragStart","onDrag","onDragEnd","MFMarker","Component","constructor","props","_onPress","bind","_ref","setCoordinate","location","_runCommand","setRotation","setTitle","setSnippet","setDraggable","setZIndex","setVisible","setInfoWindowAnchor","setElevation","setUserData","_getHandle","marker","name","args","OS","dispatchViewManagerCommand","commandId","_uiManagerCommand","_mapManagerCommand","uiManager","componentName","getViewManagerConfig","legacyConfig","Commands","config","event","stopPropagation","ref","render","resolveAssetSource","styles","style","RMFMarker","create","position"],"sources":["MFMarker.js"],"sourcesContent":["import PropTypes from 'prop-types';\r\nimport React from 'react';\r\nimport {ViewPropTypes} from 'deprecated-react-native-prop-types';\r\nimport {\r\n requireNativeComponent,\r\n StyleSheet,\r\n Platform,\r\n Image,\r\n UIManager,\r\n NativeModules,\r\n findNodeHandle\r\n} from 'react-native';\r\n\r\n// if ViewPropTypes is not defined fall back to View.propType (to support RN < 0.44)\r\nconst viewPropTypes = ViewPropTypes || View.propTypes;\r\n\r\nconst propTypes = {\r\n ...viewPropTypes,\r\n\r\n /**\r\n * The coordinate for the marker.\r\n */\r\n coordinate: PropTypes.shape({\r\n latitude: PropTypes.number.isRequired,\r\n longitude: PropTypes.number.isRequired,\r\n }).isRequired,\r\n\r\n /**\r\n * Default value is `false`\r\n */\r\n draggable: PropTypes.bool,\r\n\r\n /**\r\n * Sets the ground anchor point for the marker.\r\n */\r\n anchor: PropTypes.shape({\r\n x: PropTypes.number.isRequired,\r\n y: PropTypes.number.isRequired,\r\n }),\r\n\r\n /**\r\n * \r\n */\r\n elevation: PropTypes.number,\r\n\r\n /**\r\n * \r\n */\r\n rotation: PropTypes.number,\r\n\r\n /**\r\n * Sets the infor window anchor point for the marker.\r\n */\r\n infoWindowAnchor: PropTypes.shape({\r\n x: PropTypes.number.isRequired,\r\n y: PropTypes.number.isRequired,\r\n }),\r\n\r\n /**\r\n * The title of the marker.\r\n */\r\n title: PropTypes.string,\r\n\r\n /**\r\n * The snippet of the marker.\r\n */\r\n snippet: PropTypes.string,\r\n\r\n /**\r\n * Marker icon to render.\r\n */\r\n icon: PropTypes.shape({\r\n uri: PropTypes.any.isRequired,\r\n width: PropTypes.number.isRequired,\r\n height: PropTypes.number.isRequired,\r\n }),\r\n\r\n\r\n /**\r\n * zIndex\r\n */\r\n zIndex: PropTypes.number,\r\n\r\n /**\r\n * visible\r\n */\r\n visible: PropTypes.bool,\r\n\r\n /**\r\n * userData\r\n */\r\n userData:PropTypes.object,\r\n\r\n /**\r\n * Callback that is called when the user presses on the marker\r\n */\r\n onPress: PropTypes.func,\r\n\r\n /**\r\n * Callback that is called when the user presses on the info window\r\n */\r\n onPressInfoWindow: PropTypes.func,\r\n\r\n /**\r\n * Callback that is called when the user initiates a drag on this marker (if it is draggable)\r\n */\r\n onDragStart: PropTypes.func,\r\n\r\n /**\r\n * Callback called continuously as the marker is dragged\r\n */\r\n onDrag: PropTypes.func,\r\n\r\n /**\r\n * Callback that is called when a drag on this marker finishes. This is usually the point you\r\n * will want to setState on the marker's coordinate again\r\n */\r\n onDragEnd: PropTypes.func,\r\n};\r\n\r\n\r\nclass MFMarker extends React.Component {\r\n constructor(props) {\r\n super(props); \r\n this._onPress = this._onPress.bind(this)\r\n this._ref = this._ref.bind(this)\r\n }\r\n\r\n setCoordinate(location) {\r\n this._runCommand(\"setCoordinate\", [location])\r\n }\r\n\r\n setRotation(rotation) {\r\n this._runCommand(\"setRotation\", [rotation])\r\n }\r\n\r\n setTitle(title) {\r\n this._runCommand(\"setTitle\", [title])\r\n }\r\n\r\n setSnippet(snippet) {\r\n this._runCommand(\"setSnippet\", [snippet])\r\n }\r\n\r\n setDraggable(draggable) {\r\n this._runCommand(\"setDraggable\", [draggable])\r\n }\r\n\r\n setZIndex(zIndex) {\r\n this._runCommand(\"setZIndex\", [zIndex])\r\n }\r\n\r\n setVisible(visible) {\r\n this._runCommand(\"setVisible\", [visible])\r\n }\r\n\r\n setInfoWindowAnchor(anchor) {\r\n this._runCommand(\"setInfoWindowAnchor\", [anchor])\r\n }\r\n\r\n setElevation(elevation) {\r\n this._runCommand(\"setElevation\", [elevation])\r\n }\r\n\r\n setUserData(userData) {\r\n this._runCommand(\"setUserData\", [userData])\r\n }\r\n\r\n _getHandle() {\r\n return findNodeHandle(this.marker);\r\n }\r\n\r\n\r\n _runCommand(name, args) {\r\n switch (Platform.OS) {\r\n case 'android': {\r\n if (!UIManager || typeof UIManager.dispatchViewManagerCommand !== 'function') {\r\n return;\r\n }\r\n\r\n const commandId = this._uiManagerCommand(name);\r\n if (commandId == null) {\r\n return;\r\n }\r\n\r\n UIManager.dispatchViewManagerCommand(this._getHandle(), commandId, args);\r\n break;\r\n }\r\n \r\n case 'ios':\r\n //this.getMapManagerCommand(name)(this._getHandle(), ...args);\r\n this._mapManagerCommand(name)(this._getHandle(), ...args);\r\n break;\r\n \r\n default:\r\n break;\r\n }\r\n }\r\n\r\n _uiManagerCommand(name) {\r\n const uiManager = UIManager || NativeModules.UIManager;\r\n const componentName = \"RMFMarker\";\r\n\r\n if (!uiManager) {\r\n return null;\r\n }\r\n \r\n if (!uiManager.getViewManagerConfig) {\r\n // RN < 0.58\r\n const legacyConfig = uiManager[componentName];\r\n return legacyConfig && legacyConfig.Commands ? legacyConfig.Commands[name] : null;\r\n }\r\n \r\n // RN >= 0.58 \r\n const config = uiManager.getViewManagerConfig(componentName);\r\n return config && config.Commands ? config.Commands[name] : null;\r\n }\r\n \r\n _mapManagerCommand(name) {\r\n return NativeModules[`RMFMarker`][name];\r\n }\r\n\r\n _onPress(event) {\r\n event.stopPropagation();\r\n if (this.props.onPress) {\r\n this.props.onPress(event);\r\n }\r\n }\r\n\r\n _ref(ref) {\r\n this.marker = ref;\r\n }\r\n\r\n render() {\r\n let icon = {};\r\n if (this.props.icon) {\r\n let uri = Image.resolveAssetSource(this.props.icon.uri) || {uri: this.props.icon.uri};\r\n icon = {uri: uri.uri, width: this.props.icon.width, height: this.props.icon.height}\r\n }\r\n return <RMFMarker\r\n {...this.props}\r\n icon={icon}\r\n ref={this._ref}\r\n style={[styles.marker, this.props.style]}\r\n onPress={this._onPress}\r\n />;\r\n }\r\n}\r\n\r\nMFMarker.propTypes = propTypes;\r\nvar RMFMarker = requireNativeComponent(`RMFMarker`, MFMarker);\r\n\r\nconst styles = StyleSheet.create({\r\n marker: {\r\n position: 'absolute'\r\n },\r\n});\r\n\r\nexport {MFMarker}\r\n"],"mappings":";;AAAA,OAAOA,SAAP,MAAsB,YAAtB;AACA,OAAOC,KAAP,MAAkB,OAAlB;AACA,SAAQC,aAAR,QAA4B,oCAA5B;AACA,SACEC,sBADF,EAEEC,UAFF,EAGEC,QAHF,EAIEC,KAJF,EAKEC,SALF,EAMEC,aANF,EAOEC,cAPF,QAQO,cARP,C,CAUA;;AACA,MAAMC,aAAa,GAAGR,aAAa,IAAIS,IAAI,CAACC,SAA5C;AAEA,MAAMA,SAAS,GAAG,EAChB,GAAGF,aADa;;EAGhB;AACF;AACA;EACEG,UAAU,EAAEb,SAAS,CAACc,KAAV,CAAgB;IAC1BC,QAAQ,EAAEf,SAAS,CAACgB,MAAV,CAAiBC,UADD;IAE1BC,SAAS,EAAElB,SAAS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,MAAR,EAAgB,KAAKjB,KAAL,CAAWqC,KAA3B,CAJF;MAKL,OAAO,EAAE,KAAKpC;IALT,GAAP;EAOD;;AA7HgC;;AAgIvCJ,QAAQ,CAACjC,SAAT,GAAqBA,SAArB;AACA,IAAI0E,SAAS,GAAGnF,sBAAsB,CAAE,WAAF,EAAc0C,QAAd,CAAtC;AAEA,MAAMuC,MAAM,GAAGhF,UAAU,CAACmF,MAAX,CAAkB;EAC/BtB,MAAM,EAAE;IACNuB,QAAQ,EAAE;EADJ;AADuB,CAAlB,CAAf;AAMA,SAAQ3C,QAAR"}
|
|
@@ -3,65 +3,65 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { ViewPropTypes, ColorPropType } from 'deprecated-react-native-prop-types';
|
|
6
|
-
import { requireNativeComponent, Platform, Image, NativeModules, findNodeHandle, processColor } from 'react-native'; // if ViewPropTypes is not defined fall back to View.propType (to support RN < 0.44)
|
|
6
|
+
import { requireNativeComponent, Platform, Image, UIManager, NativeModules, findNodeHandle, processColor } from 'react-native'; // if ViewPropTypes is not defined fall back to View.propType (to support RN < 0.44)
|
|
7
7
|
|
|
8
8
|
const viewPropTypes = ViewPropTypes || View.propTypes;
|
|
9
9
|
const propTypes = { ...viewPropTypes,
|
|
10
10
|
|
|
11
|
-
/**
|
|
12
|
-
* The coordinate for the POI.
|
|
11
|
+
/**
|
|
12
|
+
* The coordinate for the POI.
|
|
13
13
|
*/
|
|
14
14
|
coordinate: PropTypes.shape({
|
|
15
15
|
latitude: PropTypes.number.isRequired,
|
|
16
16
|
longitude: PropTypes.number.isRequired
|
|
17
17
|
}).isRequired,
|
|
18
18
|
|
|
19
|
-
/**
|
|
20
|
-
* The title of the POI.
|
|
19
|
+
/**
|
|
20
|
+
* The title of the POI.
|
|
21
21
|
*/
|
|
22
22
|
title: PropTypes.string,
|
|
23
23
|
|
|
24
|
-
/**
|
|
25
|
-
* The color of the title.
|
|
24
|
+
/**
|
|
25
|
+
* The color of the title.
|
|
26
26
|
*/
|
|
27
27
|
titleColor: ColorPropType,
|
|
28
28
|
|
|
29
|
-
/**
|
|
30
|
-
* The subtile of the POI.
|
|
29
|
+
/**
|
|
30
|
+
* The subtile of the POI.
|
|
31
31
|
*/
|
|
32
32
|
subtitle: PropTypes.string,
|
|
33
33
|
|
|
34
|
-
/**
|
|
35
|
-
* The type of POI
|
|
34
|
+
/**
|
|
35
|
+
* The type of POI
|
|
36
36
|
*/
|
|
37
37
|
//poiType: PropTypes.oneOf(['cafe', 'atm', 'bank']),
|
|
38
38
|
poiType: PropTypes.string,
|
|
39
39
|
|
|
40
|
-
/**
|
|
41
|
-
* POI icon to render.
|
|
40
|
+
/**
|
|
41
|
+
* POI icon to render.
|
|
42
42
|
*/
|
|
43
43
|
icon: PropTypes.shape({
|
|
44
44
|
uri: PropTypes.any.isRequired
|
|
45
45
|
}),
|
|
46
46
|
|
|
47
|
-
/**
|
|
48
|
-
* zIndex
|
|
47
|
+
/**
|
|
48
|
+
* zIndex
|
|
49
49
|
*/
|
|
50
50
|
zIndex: PropTypes.number,
|
|
51
51
|
|
|
52
|
-
/**
|
|
53
|
-
* visible
|
|
52
|
+
/**
|
|
53
|
+
* visible
|
|
54
54
|
*/
|
|
55
55
|
//TODO
|
|
56
56
|
// visible: PropTypes.bool,
|
|
57
57
|
|
|
58
|
-
/**
|
|
59
|
-
* userData
|
|
58
|
+
/**
|
|
59
|
+
* userData
|
|
60
60
|
*/
|
|
61
61
|
userData: PropTypes.object,
|
|
62
62
|
|
|
63
|
-
/**
|
|
64
|
-
* Callback that is called when the user presses on the POI
|
|
63
|
+
/**
|
|
64
|
+
* Callback that is called when the user presses on the POI
|
|
65
65
|
*/
|
|
66
66
|
onPress: PropTypes.func
|
|
67
67
|
};
|
|
@@ -133,8 +133,20 @@ class MFPOI extends React.Component {
|
|
|
133
133
|
_runCommand(name, args) {
|
|
134
134
|
switch (Platform.OS) {
|
|
135
135
|
case 'android':
|
|
136
|
-
|
|
137
|
-
|
|
136
|
+
{
|
|
137
|
+
if (!UIManager || typeof UIManager.dispatchViewManagerCommand !== 'function') {
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
const commandId = this._uiManagerCommand(name);
|
|
142
|
+
|
|
143
|
+
if (commandId == null) {
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
UIManager.dispatchViewManagerCommand(this._getHandle(), commandId, args);
|
|
148
|
+
break;
|
|
149
|
+
}
|
|
138
150
|
|
|
139
151
|
case 'ios':
|
|
140
152
|
this._mapManagerCommand(name)(this._getHandle(), ...args);
|
|
@@ -147,16 +159,22 @@ class MFPOI extends React.Component {
|
|
|
147
159
|
}
|
|
148
160
|
|
|
149
161
|
_uiManagerCommand(name) {
|
|
150
|
-
const
|
|
162
|
+
const uiManager = UIManager || NativeModules.UIManager;
|
|
151
163
|
const componentName = "RMFPOI";
|
|
152
164
|
|
|
153
|
-
if (!
|
|
165
|
+
if (!uiManager) {
|
|
166
|
+
return null;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
if (!uiManager.getViewManagerConfig) {
|
|
154
170
|
// RN < 0.58
|
|
155
|
-
|
|
171
|
+
const legacyConfig = uiManager[componentName];
|
|
172
|
+
return legacyConfig && legacyConfig.Commands ? legacyConfig.Commands[name] : null;
|
|
156
173
|
} // RN >= 0.58
|
|
157
174
|
|
|
158
175
|
|
|
159
|
-
|
|
176
|
+
const config = uiManager.getViewManagerConfig(componentName);
|
|
177
|
+
return config && config.Commands ? config.Commands[name] : null;
|
|
160
178
|
}
|
|
161
179
|
|
|
162
180
|
_mapManagerCommand(name) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["PropTypes","React","ViewPropTypes","ColorPropType","requireNativeComponent","Platform","Image","NativeModules","findNodeHandle","processColor","viewPropTypes","View","propTypes","coordinate","shape","latitude","number","isRequired","longitude","title","string","titleColor","subtitle","poiType","icon","uri","any","zIndex","userData","object","onPress","func","MFPOI","Component","constructor","props","_onPress","bind","_ref","event","stopPropagation","ref","poi","setCoordinate","_runCommand","setTitle","setTitleColor","color","setSubTitle","setPoiType","type","setIcon","resolveAssetSource","setZIndex","setUserData","_getHandle","name","args","OS","
|
|
1
|
+
{"version":3,"names":["PropTypes","React","ViewPropTypes","ColorPropType","requireNativeComponent","Platform","Image","UIManager","NativeModules","findNodeHandle","processColor","viewPropTypes","View","propTypes","coordinate","shape","latitude","number","isRequired","longitude","title","string","titleColor","subtitle","poiType","icon","uri","any","zIndex","userData","object","onPress","func","MFPOI","Component","constructor","props","_onPress","bind","_ref","event","stopPropagation","ref","poi","setCoordinate","_runCommand","setTitle","setTitleColor","color","setSubTitle","setPoiType","type","setIcon","resolveAssetSource","setZIndex","setUserData","_getHandle","name","args","OS","dispatchViewManagerCommand","commandId","_uiManagerCommand","_mapManagerCommand","uiManager","componentName","getViewManagerConfig","legacyConfig","Commands","config","render","RMFPOI"],"sources":["MFPOI.js"],"sourcesContent":["import PropTypes from 'prop-types';\r\nimport React from 'react';\r\nimport {ViewPropTypes, ColorPropType} from 'deprecated-react-native-prop-types';\r\nimport {\r\n requireNativeComponent,\r\n Platform,\r\n Image,\r\n UIManager,\r\n NativeModules,\r\n findNodeHandle,\r\n processColor\r\n} from 'react-native';\r\n\r\n// if ViewPropTypes is not defined fall back to View.propType (to support RN < 0.44)\r\nconst viewPropTypes = ViewPropTypes || View.propTypes;\r\n\r\nconst propTypes = {\r\n ...viewPropTypes,\r\n\r\n /**\r\n * The coordinate for the POI.\r\n */\r\n coordinate: PropTypes.shape({\r\n latitude: PropTypes.number.isRequired,\r\n longitude: PropTypes.number.isRequired,\r\n }).isRequired,\r\n\r\n /**\r\n * The title of the POI.\r\n */\r\n title: PropTypes.string,\r\n\r\n /**\r\n * The color of the title.\r\n */\r\n titleColor: ColorPropType,\r\n\r\n /**\r\n * The subtile of the POI.\r\n */\r\n subtitle: PropTypes.string,\r\n\r\n /**\r\n * The type of POI\r\n */\r\n //poiType: PropTypes.oneOf(['cafe', 'atm', 'bank']),\r\n poiType: PropTypes.string,\r\n\r\n /**\r\n * POI icon to render.\r\n */\r\n icon: PropTypes.shape({\r\n uri: PropTypes.any.isRequired\r\n }),\r\n\r\n /**\r\n * zIndex\r\n */\r\n zIndex: PropTypes.number,\r\n\r\n /**\r\n * visible\r\n */\r\n //TODO\r\n // visible: PropTypes.bool,\r\n\r\n /**\r\n * userData\r\n */\r\n userData:PropTypes.object,\r\n\r\n /**\r\n * Callback that is called when the user presses on the POI\r\n */\r\n onPress: PropTypes.func,\r\n};\r\n\r\nclass MFPOI extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n this._onPress = this._onPress.bind(this)\r\n this._ref = this._ref.bind(this)\r\n }\r\n\r\n _onPress(event) {\r\n event.stopPropagation();\r\n if (this.props.onPress) {\r\n this.props.onPress(event);\r\n }\r\n }\r\n\r\n _ref(ref) {\r\n this.poi = ref;\r\n }\r\n\r\n setCoordinate(coordinate) {\r\n this._runCommand(\"setCoordinate\", [coordinate])\r\n }\r\n setTitle(title) {\r\n this._runCommand(\"setTitle\", [title])\r\n }\r\n setTitleColor(color) {\r\n this._runCommand(\"setTitleColor\", [processColor(color)])\r\n }\r\n setSubTitle(subtitle) {\r\n this._runCommand(\"setSubTitle\", [subtitle])\r\n }\r\n setPoiType(type) {\r\n this._runCommand(\"setPoiType\", [type])\r\n }\r\n setIcon(icon) {\r\n let uri = Image.resolveAssetSource(icon.uri) || { uri: icon.uri }\r\n this._runCommand(\"setIcon\", [ { uri: uri.uri } ])\r\n }\r\n setZIndex(zIndex) {\r\n this._runCommand(\"setZIndex\", [zIndex])\r\n }\r\n // setVisible(visible) {\r\n // this._runCommand(\"setVisible\", [visible])\r\n // }\r\n setUserData(userData) {\r\n this._runCommand(\"setUserData\", [userData])\r\n }\r\n\r\n _getHandle() {\r\n return findNodeHandle(this.poi);\r\n }\r\n\r\n\r\n _runCommand(name, args) {\r\n switch (Platform.OS) {\r\n case 'android': {\r\n if (!UIManager || typeof UIManager.dispatchViewManagerCommand !== 'function') {\r\n return;\r\n }\r\n\r\n const commandId = this._uiManagerCommand(name);\r\n if (commandId == null) {\r\n return;\r\n }\r\n\r\n UIManager.dispatchViewManagerCommand(this._getHandle(), commandId, args);\r\n break;\r\n }\r\n\r\n case 'ios':\r\n this._mapManagerCommand(name)(this._getHandle(), ...args);\r\n break;\r\n\r\n default:\r\n break;\r\n }\r\n }\r\n\r\n _uiManagerCommand(name) {\r\n const uiManager = UIManager || NativeModules.UIManager;\r\n const componentName = \"RMFPOI\";\r\n\r\n if (!uiManager) {\r\n return null;\r\n }\r\n\r\n if (!uiManager.getViewManagerConfig) {\r\n // RN < 0.58\r\n const legacyConfig = uiManager[componentName];\r\n return legacyConfig && legacyConfig.Commands ? legacyConfig.Commands[name] : null;\r\n }\r\n\r\n // RN >= 0.58 \r\n const config = uiManager.getViewManagerConfig(componentName);\r\n return config && config.Commands ? config.Commands[name] : null;\r\n }\r\n \r\n _mapManagerCommand(name) {\r\n return NativeModules[`RMFPOI`][name];\r\n }\r\n\r\n render() {\r\n let icon = {}\r\n if (this.props.icon) {\r\n let uri = Image.resolveAssetSource(this.props.icon.uri) || {uri: this.props.icon.uri}\r\n icon = { uri: uri.uri }\r\n }\r\n return <RMFPOI\r\n {...this.props}\r\n icon={icon}\r\n ref={this._ref}\r\n onPress={this._onPress}\r\n />;\r\n }\r\n}\r\n\r\nMFPOI.propTypes = propTypes;\r\n\r\nvar RMFPOI = requireNativeComponent(`RMFPOI`, MFPOI);\r\n\r\nexport {MFPOI}\r\n"],"mappings":";;AAAA,OAAOA,SAAP,MAAsB,YAAtB;AACA,OAAOC,KAAP,MAAkB,OAAlB;AACA,SAAQC,aAAR,EAAuBC,aAAvB,QAA2C,oCAA3C;AACA,SACEC,sBADF,EAEEC,QAFF,EAGEC,KAHF,EAIEC,SAJF,EAKEC,aALF,EAMEC,cANF,EAOEC,YA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iD,IAAxB,CAAP;EACD;;EAEDa,MAAM,GAAG;IACP,IAAI7C,IAAI,GAAG,EAAX;;IACA,IAAI,KAAKW,KAAL,CAAWX,IAAf,EAAqB;MACnB,IAAIC,GAAG,GAAGpB,KAAK,CAAC+C,kBAAN,CAAyB,KAAKjB,KAAL,CAAWX,IAAX,CAAgBC,GAAzC,KAAiD;QAACA,GAAG,EAAE,KAAKU,KAAL,CAAWX,IAAX,CAAgBC;MAAtB,CAA3D;MACAD,IAAI,GAAG;QAAEC,GAAG,EAAEA,GAAG,CAACA;MAAX,CAAP;IACD;;IACD,oBAAO,oBAAC,MAAD,eACD,KAAKU,KADJ;MAEL,IAAI,EAAEX,IAFD;MAGL,GAAG,EAAE,KAAKc,IAHL;MAIL,OAAO,EAAE,KAAKF;IAJT,GAAP;EAMD;;AAhHiC;;AAmHpCJ,KAAK,CAACpB,SAAN,GAAkBA,SAAlB;AAEA,IAAI0D,MAAM,GAAGnE,sBAAsB,CAAE,QAAF,EAAW6B,KAAX,CAAnC;AAEA,SAAQA,KAAR"}
|
|
@@ -3,65 +3,65 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import { ViewPropTypes, ColorPropType } from 'deprecated-react-native-prop-types';
|
|
6
|
-
import { requireNativeComponent, Platform, NativeModules, findNodeHandle, processColor } from 'react-native'; // if ViewPropTypes is not defined fall back to View.propType (to support RN < 0.44)
|
|
6
|
+
import { requireNativeComponent, Platform, UIManager, NativeModules, findNodeHandle, processColor } from 'react-native'; // if ViewPropTypes is not defined fall back to View.propType (to support RN < 0.44)
|
|
7
7
|
|
|
8
8
|
const viewPropTypes = ViewPropTypes || View.propTypes;
|
|
9
9
|
const propTypes = { ...viewPropTypes,
|
|
10
10
|
|
|
11
|
-
/**
|
|
12
|
-
* An array of coordinates to describe the polygon
|
|
11
|
+
/**
|
|
12
|
+
* An array of coordinates to describe the polygon
|
|
13
13
|
*/
|
|
14
14
|
coordinates: PropTypes.arrayOf(PropTypes.shape({
|
|
15
|
-
/**
|
|
16
|
-
* Latitude/Longitude coordinates
|
|
15
|
+
/**
|
|
16
|
+
* Latitude/Longitude coordinates
|
|
17
17
|
*/
|
|
18
18
|
latitude: PropTypes.number.isRequired,
|
|
19
19
|
longitude: PropTypes.number.isRequired
|
|
20
20
|
})),
|
|
21
21
|
|
|
22
|
-
/**
|
|
23
|
-
* An array of array of coordinates to describe the polygon holes
|
|
22
|
+
/**
|
|
23
|
+
* An array of array of coordinates to describe the polygon holes
|
|
24
24
|
*/
|
|
25
25
|
holes: PropTypes.arrayOf(PropTypes.arrayOf(PropTypes.shape({
|
|
26
|
-
/**
|
|
27
|
-
* Latitude/Longitude coordinates
|
|
26
|
+
/**
|
|
27
|
+
* Latitude/Longitude coordinates
|
|
28
28
|
*/
|
|
29
29
|
latitude: PropTypes.number.isRequired,
|
|
30
30
|
longitude: PropTypes.number.isRequired
|
|
31
31
|
}))),
|
|
32
32
|
|
|
33
|
-
/**
|
|
34
|
-
* The color to use for the polygon.
|
|
33
|
+
/**
|
|
34
|
+
* The color to use for the polygon.
|
|
35
35
|
*/
|
|
36
36
|
fillColor: ColorPropType,
|
|
37
37
|
|
|
38
|
-
/**
|
|
39
|
-
* The color to use for the polygon stroke.
|
|
38
|
+
/**
|
|
39
|
+
* The color to use for the polygon stroke.
|
|
40
40
|
*/
|
|
41
41
|
strokeColor: ColorPropType,
|
|
42
42
|
|
|
43
|
-
/**
|
|
44
|
-
* The stroke width to use for the polygon.
|
|
43
|
+
/**
|
|
44
|
+
* The stroke width to use for the polygon.
|
|
45
45
|
*/
|
|
46
46
|
strokeWidth: PropTypes.number,
|
|
47
47
|
|
|
48
|
-
/**
|
|
49
|
-
* zIndex
|
|
48
|
+
/**
|
|
49
|
+
* zIndex
|
|
50
50
|
*/
|
|
51
51
|
zIndex: PropTypes.number,
|
|
52
52
|
|
|
53
|
-
/**
|
|
54
|
-
* visible
|
|
53
|
+
/**
|
|
54
|
+
* visible
|
|
55
55
|
*/
|
|
56
56
|
visible: PropTypes.bool,
|
|
57
57
|
|
|
58
|
-
/**
|
|
59
|
-
* userData
|
|
58
|
+
/**
|
|
59
|
+
* userData
|
|
60
60
|
*/
|
|
61
61
|
userData: PropTypes.object,
|
|
62
62
|
|
|
63
|
-
/**
|
|
64
|
-
* Callback that is called when the user presses on the polygon
|
|
63
|
+
/**
|
|
64
|
+
* Callback that is called when the user presses on the polygon
|
|
65
65
|
*/
|
|
66
66
|
onPress: PropTypes.func
|
|
67
67
|
};
|
|
@@ -124,8 +124,20 @@ class MFPolygon extends React.Component {
|
|
|
124
124
|
_runCommand(name, args) {
|
|
125
125
|
switch (Platform.OS) {
|
|
126
126
|
case 'android':
|
|
127
|
-
|
|
128
|
-
|
|
127
|
+
{
|
|
128
|
+
if (!UIManager || typeof UIManager.dispatchViewManagerCommand !== 'function') {
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
const commandId = this._uiManagerCommand(name);
|
|
133
|
+
|
|
134
|
+
if (commandId == null) {
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
UIManager.dispatchViewManagerCommand(this._getHandle(), commandId, args);
|
|
139
|
+
break;
|
|
140
|
+
}
|
|
129
141
|
|
|
130
142
|
case 'ios':
|
|
131
143
|
this._mapManagerCommand(name)(this._getHandle(), ...args);
|
|
@@ -138,16 +150,22 @@ class MFPolygon extends React.Component {
|
|
|
138
150
|
}
|
|
139
151
|
|
|
140
152
|
_uiManagerCommand(name) {
|
|
141
|
-
const
|
|
153
|
+
const uiManager = UIManager || NativeModules.UIManager;
|
|
142
154
|
const componentName = "RMFPolygon";
|
|
143
155
|
|
|
144
|
-
if (!
|
|
156
|
+
if (!uiManager) {
|
|
157
|
+
return null;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
if (!uiManager.getViewManagerConfig) {
|
|
145
161
|
// RN < 0.58
|
|
146
|
-
|
|
162
|
+
const legacyConfig = uiManager[componentName];
|
|
163
|
+
return legacyConfig && legacyConfig.Commands ? legacyConfig.Commands[name] : null;
|
|
147
164
|
} // RN >= 0.58
|
|
148
165
|
|
|
149
166
|
|
|
150
|
-
|
|
167
|
+
const config = uiManager.getViewManagerConfig(componentName);
|
|
168
|
+
return config && config.Commands ? config.Commands[name] : null;
|
|
151
169
|
}
|
|
152
170
|
|
|
153
171
|
_mapManagerCommand(name) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","PropTypes","ViewPropTypes","ColorPropType","requireNativeComponent","Platform","NativeModules","findNodeHandle","processColor","viewPropTypes","View","propTypes","coordinates","arrayOf","shape","latitude","number","isRequired","longitude","holes","fillColor","strokeColor","strokeWidth","zIndex","visible","bool","userData","object","onPress","func","MFPolygon","Component","constructor","props","_onPress","bind","_ref","event","stopPropagation","ref","polygon","setCoordinates","_runCommand","setHoles","setFillColor","color","setStrokeColor","setStrokeWidth","width","setVisible","setZIndex","setUserData","_getHandle","name","args","OS","
|
|
1
|
+
{"version":3,"names":["React","PropTypes","ViewPropTypes","ColorPropType","requireNativeComponent","Platform","UIManager","NativeModules","findNodeHandle","processColor","viewPropTypes","View","propTypes","coordinates","arrayOf","shape","latitude","number","isRequired","longitude","holes","fillColor","strokeColor","strokeWidth","zIndex","visible","bool","userData","object","onPress","func","MFPolygon","Component","constructor","props","_onPress","bind","_ref","event","stopPropagation","ref","polygon","setCoordinates","_runCommand","setHoles","setFillColor","color","setStrokeColor","setStrokeWidth","width","setVisible","setZIndex","setUserData","_getHandle","name","args","OS","dispatchViewManagerCommand","commandId","_uiManagerCommand","_mapManagerCommand","uiManager","componentName","getViewManagerConfig","legacyConfig","Commands","config","render","RMFPolygon"],"sources":["MFPolygon.js"],"sourcesContent":["import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport {ViewPropTypes, ColorPropType} from 'deprecated-react-native-prop-types';\r\nimport {\r\n requireNativeComponent,\r\n Platform,\r\n UIManager,\r\n NativeModules,\r\n findNodeHandle,\r\n processColor\r\n} from 'react-native';\r\n\r\n// if ViewPropTypes is not defined fall back to View.propType (to support RN < 0.44)\r\nconst viewPropTypes = ViewPropTypes || View.propTypes;\r\n\r\nconst propTypes = {\r\n ...viewPropTypes,\r\n\r\n /**\r\n * An array of coordinates to describe the polygon\r\n */\r\n coordinates: PropTypes.arrayOf(\r\n PropTypes.shape({\r\n /**\r\n * Latitude/Longitude coordinates\r\n */\r\n latitude: PropTypes.number.isRequired,\r\n longitude: PropTypes.number.isRequired,\r\n })\r\n ),\r\n\r\n /**\r\n * An array of array of coordinates to describe the polygon holes\r\n */\r\n holes: PropTypes.arrayOf(\r\n PropTypes.arrayOf(\r\n PropTypes.shape({\r\n /**\r\n * Latitude/Longitude coordinates\r\n */\r\n latitude: PropTypes.number.isRequired,\r\n longitude: PropTypes.number.isRequired,\r\n })\r\n )\r\n ),\r\n\r\n /**\r\n * The color to use for the polygon.\r\n */\r\n fillColor: ColorPropType,\r\n\r\n /**\r\n * The color to use for the polygon stroke.\r\n */\r\n strokeColor: ColorPropType,\r\n\r\n /**\r\n * The stroke width to use for the polygon.\r\n */\r\n strokeWidth: PropTypes.number,\r\n\r\n /**\r\n * zIndex\r\n */\r\n zIndex: PropTypes.number,\r\n\r\n /**\r\n * visible\r\n */\r\n visible: PropTypes.bool,\r\n\r\n /**\r\n * userData\r\n */\r\n userData:PropTypes.object,\r\n\r\n /**\r\n * Callback that is called when the user presses on the polygon\r\n */\r\n onPress: PropTypes.func,\r\n};\r\n\r\n\r\nclass MFPolygon extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n this._onPress = this._onPress.bind(this)\r\n this._ref = this._ref.bind(this)\r\n }\r\n\r\n _onPress(event) {\r\n event.stopPropagation();\r\n if (this.props.onPress) {\r\n this.props.onPress(event);\r\n }\r\n }\r\n\r\n _ref(ref) {\r\n this.polygon = ref;\r\n }\r\n\r\n setCoordinates(coordinates) {\r\n this._runCommand(\"setCoordinates\", [coordinates])\r\n }\r\n\r\n setHoles(holes) {\r\n this._runCommand(\"setHoles\", [holes])\r\n }\r\n\r\n setFillColor(color) {\r\n this._runCommand(\"setFillColor\", [processColor(color)])\r\n }\r\n\r\n setStrokeColor(color) {\r\n this._runCommand(\"setStrokeColor\", [processColor(color)])\r\n }\r\n\r\n setStrokeWidth(width) {\r\n this._runCommand(\"setStrokeWidth\", [width])\r\n }\r\n\r\n setVisible(visible) {\r\n this._runCommand(\"setVisible\", [visible])\r\n }\r\n\r\n setZIndex(zIndex) {\r\n this._runCommand(\"setZIndex\", [zIndex])\r\n }\r\n\r\n setUserData(userData) {\r\n this._runCommand(\"setUserData\", [userData])\r\n }\r\n\r\n _getHandle() {\r\n return findNodeHandle(this.polygon);\r\n }\r\n\r\n _runCommand(name, args) {\r\n switch (Platform.OS) {\r\n case 'android': {\r\n if (!UIManager || typeof UIManager.dispatchViewManagerCommand !== 'function') {\r\n return;\r\n }\r\n\r\n const commandId = this._uiManagerCommand(name);\r\n if (commandId == null) {\r\n return;\r\n }\r\n\r\n UIManager.dispatchViewManagerCommand(this._getHandle(), commandId, args);\r\n break;\r\n }\r\n\r\n case 'ios':\r\n this._mapManagerCommand(name)(this._getHandle(), ...args);\r\n break;\r\n\r\n default:\r\n break;\r\n }\r\n }\r\n\r\n _uiManagerCommand(name) {\r\n const uiManager = UIManager || NativeModules.UIManager;\r\n const componentName = \"RMFPolygon\";\r\n\r\n if (!uiManager) {\r\n return null;\r\n }\r\n\r\n if (!uiManager.getViewManagerConfig) {\r\n // RN < 0.58\r\n const legacyConfig = uiManager[componentName];\r\n return legacyConfig && legacyConfig.Commands ? legacyConfig.Commands[name] : null;\r\n }\r\n\r\n // RN >= 0.58 \r\n const config = uiManager.getViewManagerConfig(componentName);\r\n return config && config.Commands ? config.Commands[name] : null;\r\n }\r\n\r\n _mapManagerCommand(name) {\r\n return NativeModules[`RMFPolygon`][name];\r\n }\r\n\r\n render() {\r\n return <RMFPolygon\r\n {...this.props}\r\n ref={this._ref}\r\n onPress={this._onPress}\r\n />;\r\n }\r\n}\r\n\r\nMFPolygon.propTypes = propTypes;\r\n\r\nvar RMFPolygon = requireNativeComponent(`RMFPolygon`, MFPolygon);\r\n\r\nexport { MFPolygon }\r\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,SAAQC,aAAR,EAAuBC,aAAvB,QAA2C,oCAA3C;AACA,SACEC,sBADF,EAEEC,QAFF,EAGEC,SAHF,EAIEC,aAJF,EAKEC,cALF,EAMEC,YANF,QAOO,cAPP,C,CASA;;AACA,MAAMC,aAAa,GAAGR,aAAa,IAAIS,IAAI,CAACC,SAA5C;AAEA,MAAMA,SAAS,GAAG,EAChB,GAAGF,aADa;;EAGhB;AACF;AACA;EACEG,WAAW,EAAEZ,SAAS,CAACa,OAAV,CACXb,SAAS,CAACc,KAAV,CAAgB;IACd;AACN;AACA;IACMC,QAAQ,EAAEf,SAAS,CAACgB,MAAV,CAAiBC,UAJb;IAKdC,SAAS,EAAElB,SAAS,CAACgB,MAAV,CAAiBC;EALd,CAAhB,CADW,CANG;;EAgBhB;AACF;AACA;EACEE,KAAK,EAAEnB,SAAS,CAACa,OAAV,CACLb,SAAS,CAACa,OAAV,CACEb,SAAS,CAACc,KAAV,CAAgB;IACd;AACR;AACA;IACQC,QAAQ,EAAEf,SAAS,CAACgB,MAAV,CAAiBC,UAJb;IAKdC,SAAS,EAAElB,SAAS,CAACgB,MAAV,CAAiBC;EALd,CAAhB,CADF,CADK,CAnBS;;EA+BhB;AACF;AACA;EACEG,SAAS,EAAElB,aAlCK;;EAoChB;AACF;AACA;EACEmB,WAAW,EAAEnB,aAvCG;;EAyChB;AACF;AACA;EACEoB,WAAW,EAAEtB,SAAS,CAACgB,MA5CP;;EA8ChB;AACF;AACA;EACEO,MAAM,EAAEvB,SAAS,CAACgB,MAjDF;;EAmDhB;AACF;AACA;EACEQ,OAAO,EAAExB,SAAS,C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