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,74 +3,74 @@ 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, Image, NativeModules, findNodeHandle, processColor } from 'react-native';
|
|
6
|
+
import { requireNativeComponent, Platform, Image, UIManager, NativeModules, findNodeHandle, processColor } from 'react-native';
|
|
7
7
|
const viewPropTypes = ViewPropTypes || View.propTypes;
|
|
8
8
|
const propTypes = { ...viewPropTypes,
|
|
9
9
|
|
|
10
|
-
/**
|
|
11
|
-
* The directions to display on the map,
|
|
12
|
-
* retrieved as an array of array of coordinates to describe the routes.
|
|
13
|
-
* Similar to directions prop but has higher priority
|
|
10
|
+
/**
|
|
11
|
+
* The directions to display on the map,
|
|
12
|
+
* retrieved as an array of array of coordinates to describe the routes.
|
|
13
|
+
* Similar to directions prop but has higher priority
|
|
14
14
|
*/
|
|
15
15
|
routes: PropTypes.arrayOf(PropTypes.arrayOf(PropTypes.shape({
|
|
16
16
|
latitude: PropTypes.number.isRequired,
|
|
17
17
|
longitude: PropTypes.number.isRequired
|
|
18
18
|
}))),
|
|
19
19
|
|
|
20
|
-
/**
|
|
21
|
-
* The directions to display on the map,
|
|
22
|
-
* retrieved as a json string from Get route Map4D API (/sdk/route).
|
|
23
|
-
* Similar to routes prop but with lower priority
|
|
20
|
+
/**
|
|
21
|
+
* The directions to display on the map,
|
|
22
|
+
* retrieved as a json string from Get route Map4D API (/sdk/route).
|
|
23
|
+
* Similar to routes prop but with lower priority
|
|
24
24
|
*/
|
|
25
25
|
directions: PropTypes.string,
|
|
26
26
|
|
|
27
|
-
/**
|
|
28
|
-
* The index of the main route, default value is 0.
|
|
27
|
+
/**
|
|
28
|
+
* The index of the main route, default value is 0.
|
|
29
29
|
*/
|
|
30
30
|
activedIndex: PropTypes.number,
|
|
31
31
|
|
|
32
|
-
/**
|
|
33
|
-
* The active route stroke width.
|
|
32
|
+
/**
|
|
33
|
+
* The active route stroke width.
|
|
34
34
|
*/
|
|
35
35
|
activeStrokeWidth: PropTypes.number,
|
|
36
36
|
|
|
37
|
-
/**
|
|
38
|
-
* The active route color.
|
|
37
|
+
/**
|
|
38
|
+
* The active route color.
|
|
39
39
|
*/
|
|
40
40
|
activeStrokeColor: ColorPropType,
|
|
41
41
|
|
|
42
|
-
/**
|
|
43
|
-
* The active route outline stroke width.
|
|
42
|
+
/**
|
|
43
|
+
* The active route outline stroke width.
|
|
44
44
|
*/
|
|
45
45
|
activeOutlineWidth: PropTypes.number,
|
|
46
46
|
|
|
47
|
-
/**
|
|
48
|
-
* The active route outline color.
|
|
47
|
+
/**
|
|
48
|
+
* The active route outline color.
|
|
49
49
|
*/
|
|
50
50
|
activeOutlineColor: ColorPropType,
|
|
51
51
|
|
|
52
|
-
/**
|
|
53
|
-
* The inactive route stroke width.
|
|
52
|
+
/**
|
|
53
|
+
* The inactive route stroke width.
|
|
54
54
|
*/
|
|
55
55
|
inactiveStrokeWidth: PropTypes.number,
|
|
56
56
|
|
|
57
|
-
/**
|
|
58
|
-
* The inactive route color.
|
|
57
|
+
/**
|
|
58
|
+
* The inactive route color.
|
|
59
59
|
*/
|
|
60
60
|
inactiveStrokeColor: ColorPropType,
|
|
61
61
|
|
|
62
|
-
/**
|
|
63
|
-
* The inactive route outline stroke width.
|
|
62
|
+
/**
|
|
63
|
+
* The inactive route outline stroke width.
|
|
64
64
|
*/
|
|
65
65
|
inactiveOutlineWidth: PropTypes.number,
|
|
66
66
|
|
|
67
|
-
/**
|
|
68
|
-
* The inactive route outline color.
|
|
67
|
+
/**
|
|
68
|
+
* The inactive route outline color.
|
|
69
69
|
*/
|
|
70
70
|
inactiveOutlineColor: ColorPropType,
|
|
71
71
|
|
|
72
|
-
/**
|
|
73
|
-
* The options of the origin POI.
|
|
72
|
+
/**
|
|
73
|
+
* The options of the origin POI.
|
|
74
74
|
*/
|
|
75
75
|
originPOIOptions: PropTypes.shape({
|
|
76
76
|
coordinate: PropTypes.shape({
|
|
@@ -85,8 +85,8 @@ const propTypes = { ...viewPropTypes,
|
|
|
85
85
|
visible: PropTypes.bool
|
|
86
86
|
}),
|
|
87
87
|
|
|
88
|
-
/**
|
|
89
|
-
* The options of the destination POI.
|
|
88
|
+
/**
|
|
89
|
+
* The options of the destination POI.
|
|
90
90
|
*/
|
|
91
91
|
destinationPOIOptions: PropTypes.shape({
|
|
92
92
|
coordinate: PropTypes.shape({
|
|
@@ -101,8 +101,8 @@ const propTypes = { ...viewPropTypes,
|
|
|
101
101
|
visible: PropTypes.bool
|
|
102
102
|
}),
|
|
103
103
|
|
|
104
|
-
/**
|
|
105
|
-
* Callback that is called when the user presses on the routes.
|
|
104
|
+
/**
|
|
105
|
+
* Callback that is called when the user presses on the routes.
|
|
106
106
|
*/
|
|
107
107
|
onPress: PropTypes.func
|
|
108
108
|
};
|
|
@@ -184,8 +184,20 @@ class MFDirectionsRenderer extends React.Component {
|
|
|
184
184
|
_runCommand(name, args) {
|
|
185
185
|
switch (Platform.OS) {
|
|
186
186
|
case 'android':
|
|
187
|
-
|
|
188
|
-
|
|
187
|
+
{
|
|
188
|
+
if (!UIManager || typeof UIManager.dispatchViewManagerCommand !== 'function') {
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
const commandId = this._uiManagerCommand(name);
|
|
193
|
+
|
|
194
|
+
if (commandId == null) {
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
UIManager.dispatchViewManagerCommand(this._getHandle(), commandId, args);
|
|
199
|
+
break;
|
|
200
|
+
}
|
|
189
201
|
|
|
190
202
|
case 'ios':
|
|
191
203
|
this._mapManagerCommand(name)(this._getHandle(), ...args);
|
|
@@ -202,16 +214,22 @@ class MFDirectionsRenderer extends React.Component {
|
|
|
202
214
|
}
|
|
203
215
|
|
|
204
216
|
_uiManagerCommand(name) {
|
|
205
|
-
const
|
|
217
|
+
const uiManager = UIManager || NativeModules.UIManager;
|
|
206
218
|
const componentName = "RMFDirectionsRenderer";
|
|
207
219
|
|
|
208
|
-
if (!
|
|
220
|
+
if (!uiManager) {
|
|
221
|
+
return null;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
if (!uiManager.getViewManagerConfig) {
|
|
209
225
|
// RN < 0.58
|
|
210
|
-
|
|
226
|
+
const legacyConfig = uiManager[componentName];
|
|
227
|
+
return legacyConfig && legacyConfig.Commands ? legacyConfig.Commands[name] : null;
|
|
211
228
|
} // RN >= 0.58
|
|
212
229
|
|
|
213
230
|
|
|
214
|
-
|
|
231
|
+
const config = uiManager.getViewManagerConfig(componentName);
|
|
232
|
+
return config && config.Commands ? config.Commands[name] : null;
|
|
215
233
|
}
|
|
216
234
|
|
|
217
235
|
_mapManagerCommand(name) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","PropTypes","ViewPropTypes","ColorPropType","requireNativeComponent","Platform","Image","NativeModules","findNodeHandle","processColor","viewPropTypes","View","propTypes","routes","arrayOf","shape","latitude","number","isRequired","longitude","directions","string","activedIndex","activeStrokeWidth","activeStrokeColor","activeOutlineWidth","activeOutlineColor","inactiveStrokeWidth","inactiveStrokeColor","inactiveOutlineWidth","inactiveOutlineColor","originPOIOptions","coordinate","icon","uri","any","title","titleColor","visible","bool","destinationPOIOptions","onPress","func","MFDirectionsRenderer","Component","constructor","props","_ref","bind","_onPress","setActivedIndex","index","_runCommand","setRoutes","setDirections","render","resolveAssetSource","ref","renderer","event","stopPropagation","name","args","OS","UIManager","dispatchViewManagerCommand","_getHandle","_uiManagerCommand","_mapManagerCommand","componentName","getViewManagerConfig","Commands","RMFDirectionsRenderer"],"sources":["MFDirectionsRenderer.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {ViewPropTypes, ColorPropType} from 'deprecated-react-native-prop-types';\nimport {\n requireNativeComponent,\n Platform,\n Image,\n NativeModules,\n findNodeHandle,\n processColor\n} from 'react-native';\n\nconst viewPropTypes = ViewPropTypes || View.propTypes;\n\nconst propTypes = {\n ...viewPropTypes,\n\n /**\n * The directions to display on the map,\n * retrieved as an array of array of coordinates to describe the routes.\n * Similar to directions prop but has higher priority\n */\n routes: PropTypes.arrayOf(\n PropTypes.arrayOf(\n PropTypes.shape({\n latitude: PropTypes.number.isRequired,\n longitude: PropTypes.number.isRequired,\n })\n )\n ),\n\n /**\n * The directions to display on the map,\n * retrieved as a json string from Get route Map4D API (/sdk/route).\n * Similar to routes prop but with lower priority\n */\n directions: PropTypes.string,\n\n /**\n * The index of the main route, default value is 0.\n */\n activedIndex: PropTypes.number,\n\n /**\n * The active route stroke width.\n */\n activeStrokeWidth: PropTypes.number,\n\n /**\n * The active route color.\n */\n activeStrokeColor: ColorPropType,\n\n /**\n * The active route outline stroke width.\n */\n activeOutlineWidth: PropTypes.number,\n\n /**\n * The active route outline color.\n */\n activeOutlineColor: ColorPropType,\n\n /**\n * The inactive route stroke width.\n */\n inactiveStrokeWidth: PropTypes.number,\n\n /**\n * The inactive route color.\n */\n inactiveStrokeColor: ColorPropType,\n\n /**\n * The inactive route outline stroke width.\n */\n inactiveOutlineWidth: PropTypes.number,\n\n /**\n * The inactive route outline color.\n */\n inactiveOutlineColor: ColorPropType,\n\n /**\n * The options of the origin POI.\n */\n originPOIOptions: PropTypes.shape({\n coordinate: PropTypes.shape({\n latitude: PropTypes.number.isRequired,\n longitude: PropTypes.number.isRequired,\n }),\n\n icon: PropTypes.shape({\n uri: PropTypes.any.isRequired\n }),\n\n title: PropTypes.string,\n\n titleColor: ColorPropType,\n\n visible: PropTypes.bool,\n }),\n\n /**\n * The options of the destination POI.\n */\n destinationPOIOptions: PropTypes.shape({\n coordinate: PropTypes.shape({\n latitude: PropTypes.number.isRequired,\n longitude: PropTypes.number.isRequired,\n }),\n\n icon: PropTypes.shape({\n uri: PropTypes.any.isRequired\n }),\n\n title: PropTypes.string,\n\n titleColor: ColorPropType,\n\n visible: PropTypes.bool,\n }),\n\n /**\n * Callback that is called when the user presses on the routes.\n */\n onPress: PropTypes.func,\n};\n\nclass MFDirectionsRenderer extends React.Component {\n constructor(props) {\n super(props)\n this._ref = this._ref.bind(this)\n this._onPress = this._onPress.bind(this)\n }\n\n setActivedIndex(index) {\n this._runCommand(\"setActivedIndex\", [index])\n }\n\n setRoutes(routes) {\n this._runCommand(\"setRoutes\", [routes])\n }\n\n setDirections(directions) {\n this._runCommand(\"setDirections\", [directions])\n }\n\n render() {\n let originPOIOptions = this.props.originPOIOptions\n if (originPOIOptions) {\n if (originPOIOptions.titleColor) {\n originPOIOptions.titleColor = processColor(originPOIOptions.titleColor)\n }\n if (originPOIOptions.icon) {\n let uri = Image.resolveAssetSource(originPOIOptions.icon.uri) || {uri: originPOIOptions.icon.uri};\n originPOIOptions.icon = {uri: uri.uri}\n }\n }\n\n let destinationPOIOptions = this.props.destinationPOIOptions\n if (destinationPOIOptions) {\n if (destinationPOIOptions.titleColor) {\n destinationPOIOptions.titleColor = processColor(destinationPOIOptions.titleColor)\n }\n if (destinationPOIOptions.icon) {\n let uri = Image.resolveAssetSource(destinationPOIOptions.icon.uri) || {uri: destinationPOIOptions.icon.uri};\n destinationPOIOptions.icon = {uri: uri.uri}\n }\n }\n\n return <RMFDirectionsRenderer\n {...this.props}\n originPOIOptions={originPOIOptions}\n destinationPOIOptions={destinationPOIOptions}\n ref={this._ref}\n onPress={this._onPress}\n />;\n }\n\n _ref(ref) {\n this.renderer = ref;\n }\n\n _onPress(event) {\n event.stopPropagation();\n if (this.props.onPress) {\n this.props.onPress(event);\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._mapManagerCommand(name)(this._getHandle(), ...args);\n break;\n\n default:\n break;\n }\n }\n\n _getHandle() {\n return findNodeHandle(this.renderer);\n }\n\n _uiManagerCommand(name) {\n const UIManager = NativeModules.UIManager;\n const componentName = \"RMFDirectionsRenderer\";\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[`RMFDirectionsRenderer`][name];\n }\n}\n\nMFDirectionsRenderer.propTypes = propTypes;\n\nvar RMFDirectionsRenderer = requireNativeComponent(`RMFDirectionsRenderer`, MFDirectionsRenderer);\n\nexport { MFDirectionsRenderer }\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,SAAQC,aAAR,EAAuBC,aAAvB,QAA2C,oCAA3C;AACA,SACEC,sBADF,EAEEC,QA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AP;EACD;;AApGgD;;AAuGnDlB,oBAAoB,CAAC/B,SAArB,GAAiCA,SAAjC;AAEA,IAAI4D,qBAAqB,GAAGpE,sBAAsB,CAAE,uBAAF,EAA0BuC,oBAA1B,CAAlD;AAEA,SAASA,oBAAT"}
|
|
1
|
+
{"version":3,"names":["React","PropTypes","ViewPropTypes","ColorPropType","requireNativeComponent","Platform","Image","UIManager","NativeModules","findNodeHandle","processColor","viewPropTypes","View","propTypes","routes","arrayOf","shape","latitude","number","isRequired","longitude","directions","string","activedIndex","activeStrokeWidth","activeStrokeColor","activeOutlineWidth","activeOutlineColor","inactiveStrokeWidth","inactiveStrokeColor","inactiveOutlineWidth","inactiveOutlineColor","originPOIOptions","coordinate","icon","uri","any","title","titleColor","visible","bool","destinationPOIOptions","onPress","func","MFDirectionsRenderer","Component","constructor","props","_ref","bind","_onPress","setActivedIndex","index","_runCommand","setRoutes","setDirections","render","resolveAssetSource","ref","renderer","event","stopPropagation","name","args","OS","dispatchViewManagerCommand","commandId","_uiManagerCommand","_getHandle","_mapManagerCommand","uiManager","componentName","getViewManagerConfig","legacyConfig","Commands","config","RMFDirectionsRenderer"],"sources":["MFDirectionsRenderer.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 Image,\r\n UIManager,\r\n NativeModules,\r\n findNodeHandle,\r\n processColor\r\n} from 'react-native';\r\n\r\nconst viewPropTypes = ViewPropTypes || View.propTypes;\r\n\r\nconst propTypes = {\r\n ...viewPropTypes,\r\n\r\n /**\r\n * The directions to display on the map,\r\n * retrieved as an array of array of coordinates to describe the routes.\r\n * Similar to directions prop but has higher priority\r\n */\r\n routes: PropTypes.arrayOf(\r\n PropTypes.arrayOf(\r\n PropTypes.shape({\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 directions to display on the map,\r\n * retrieved as a json string from Get route Map4D API (/sdk/route).\r\n * Similar to routes prop but with lower priority\r\n */\r\n directions: PropTypes.string,\r\n\r\n /**\r\n * The index of the main route, default value is 0.\r\n */\r\n activedIndex: PropTypes.number,\r\n\r\n /**\r\n * The active route stroke width.\r\n */\r\n activeStrokeWidth: PropTypes.number,\r\n\r\n /**\r\n * The active route color.\r\n */\r\n activeStrokeColor: ColorPropType,\r\n\r\n /**\r\n * The active route outline stroke width.\r\n */\r\n activeOutlineWidth: PropTypes.number,\r\n\r\n /**\r\n * The active route outline color.\r\n */\r\n activeOutlineColor: ColorPropType,\r\n\r\n /**\r\n * The inactive route stroke width.\r\n */\r\n inactiveStrokeWidth: PropTypes.number,\r\n\r\n /**\r\n * The inactive route color.\r\n */\r\n inactiveStrokeColor: ColorPropType,\r\n\r\n /**\r\n * The inactive route outline stroke width.\r\n */\r\n inactiveOutlineWidth: PropTypes.number,\r\n\r\n /**\r\n * The inactive route outline color.\r\n */\r\n inactiveOutlineColor: ColorPropType,\r\n\r\n /**\r\n * The options of the origin POI.\r\n */\r\n originPOIOptions: PropTypes.shape({\r\n coordinate: PropTypes.shape({\r\n latitude: PropTypes.number.isRequired,\r\n longitude: PropTypes.number.isRequired,\r\n }),\r\n\r\n icon: PropTypes.shape({\r\n uri: PropTypes.any.isRequired\r\n }),\r\n\r\n title: PropTypes.string,\r\n\r\n titleColor: ColorPropType,\r\n\r\n visible: PropTypes.bool,\r\n }),\r\n\r\n /**\r\n * The options of the destination POI.\r\n */\r\n destinationPOIOptions: PropTypes.shape({\r\n coordinate: PropTypes.shape({\r\n latitude: PropTypes.number.isRequired,\r\n longitude: PropTypes.number.isRequired,\r\n }),\r\n\r\n icon: PropTypes.shape({\r\n uri: PropTypes.any.isRequired\r\n }),\r\n\r\n title: PropTypes.string,\r\n\r\n titleColor: ColorPropType,\r\n\r\n visible: PropTypes.bool,\r\n }),\r\n\r\n /**\r\n * Callback that is called when the user presses on the routes.\r\n */\r\n onPress: PropTypes.func,\r\n};\r\n\r\nclass MFDirectionsRenderer extends React.Component {\r\n constructor(props) {\r\n super(props)\r\n this._ref = this._ref.bind(this)\r\n this._onPress = this._onPress.bind(this)\r\n }\r\n\r\n setActivedIndex(index) {\r\n this._runCommand(\"setActivedIndex\", [index])\r\n }\r\n\r\n setRoutes(routes) {\r\n this._runCommand(\"setRoutes\", [routes])\r\n }\r\n\r\n setDirections(directions) {\r\n this._runCommand(\"setDirections\", [directions])\r\n }\r\n\r\n render() {\r\n let originPOIOptions = this.props.originPOIOptions\r\n if (originPOIOptions) {\r\n if (originPOIOptions.titleColor) {\r\n originPOIOptions.titleColor = processColor(originPOIOptions.titleColor)\r\n }\r\n if (originPOIOptions.icon) {\r\n let uri = Image.resolveAssetSource(originPOIOptions.icon.uri) || {uri: originPOIOptions.icon.uri};\r\n originPOIOptions.icon = {uri: uri.uri}\r\n }\r\n }\r\n\r\n let destinationPOIOptions = this.props.destinationPOIOptions\r\n if (destinationPOIOptions) {\r\n if (destinationPOIOptions.titleColor) {\r\n destinationPOIOptions.titleColor = processColor(destinationPOIOptions.titleColor)\r\n }\r\n if (destinationPOIOptions.icon) {\r\n let uri = Image.resolveAssetSource(destinationPOIOptions.icon.uri) || {uri: destinationPOIOptions.icon.uri};\r\n destinationPOIOptions.icon = {uri: uri.uri}\r\n }\r\n }\r\n\r\n return <RMFDirectionsRenderer\r\n {...this.props}\r\n originPOIOptions={originPOIOptions}\r\n destinationPOIOptions={destinationPOIOptions}\r\n ref={this._ref}\r\n onPress={this._onPress}\r\n />;\r\n }\r\n\r\n _ref(ref) {\r\n this.renderer = ref;\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 _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 _getHandle() {\r\n return findNodeHandle(this.renderer);\r\n }\r\n\r\n _uiManagerCommand(name) {\r\n const uiManager = UIManager || NativeModules.UIManager;\r\n const componentName = \"RMFDirectionsRenderer\";\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[`RMFDirectionsRenderer`][name];\r\n }\r\n}\r\n\r\nMFDirectionsRenderer.propTypes = propTypes;\r\n\r\nvar RMFDirectionsRenderer = requireNativeComponent(`RMFDirectionsRenderer`, MFDirectionsRenderer);\r\n\r\nexport { MFDirectionsRenderer }\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,KAHF,EAIEC,SAJF,EAKEC,aALF,EAMEC,cANF,EAOEC,YAPF,QAQO,cARP;AAUA,MAAMC,aAAa,GAAGT,aAAa,IAAIU,IAAI,CAACC,SAA5C;AAEA,MAAMA,SAAS,GAAG,EAChB,GAAGF,aADa;;EAGhB;AACF;AACA;AACA;AACA;EACEG,MAAM,EAAEb,SAAS,CAACc,OAAV,CACNd,SAAS,CAACc,OAAV,CACEd,SAAS,CAACe,K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B,GAA4BC,MAAM,CAACD,QAAP,CAAgBZ,IAAhB,CAA5B,GAAoD,IAA3D;EACD;;EAEDO,kBAAkB,CAACP,IAAD,EAAO;IACvB,OAAOtD,aAAa,CAAE,uBAAF,CAAb,CAAuCsD,IAAvC,CAAP;EACD;;AAhHgD;;AAmHnDlB,oBAAoB,CAAC/B,SAArB,GAAiCA,SAAjC;AAEA,IAAI+D,qBAAqB,GAAGxE,sBAAsB,CAAE,uBAAF,EAA0BwC,oBAA1B,CAAlD;AAEA,SAASA,oBAAT"}
|
|
@@ -6,7 +6,7 @@ import { ViewPropTypes, ColorPropType } from 'deprecated-react-native-prop-types
|
|
|
6
6
|
import { AreaFocusManager } from './extends/AreaFocusManager';
|
|
7
7
|
import { AreaFocuser } from './extends/AreaFocuser';
|
|
8
8
|
import { MFPolygon } from './MFPolygon';
|
|
9
|
-
import { requireNativeComponent, Platform, NativeModules, findNodeHandle } from 'react-native';
|
|
9
|
+
import { requireNativeComponent, Platform, UIManager, NativeModules, findNodeHandle } from 'react-native';
|
|
10
10
|
const CameraShape = PropTypes.shape({
|
|
11
11
|
target: PropTypes.shape({
|
|
12
12
|
latitude: PropTypes.number.isRequired,
|
|
@@ -20,122 +20,122 @@ const CameraShape = PropTypes.shape({
|
|
|
20
20
|
const viewPropTypes = ViewPropTypes || View.propTypes;
|
|
21
21
|
const propTypes = { ...viewPropTypes,
|
|
22
22
|
|
|
23
|
-
/**
|
|
24
|
-
* An opaque identifier for a custom map configuration.
|
|
23
|
+
/**
|
|
24
|
+
* An opaque identifier for a custom map configuration.
|
|
25
25
|
*/
|
|
26
26
|
mapID: PropTypes.string,
|
|
27
27
|
|
|
28
|
-
/**
|
|
29
|
-
* Map style by string for a custom map configuration.
|
|
28
|
+
/**
|
|
29
|
+
* Map style by string for a custom map configuration.
|
|
30
30
|
*/
|
|
31
31
|
mapStyle: PropTypes.string,
|
|
32
32
|
|
|
33
|
-
/**
|
|
34
|
-
* If `false` hide the button to move map to the current user's location.
|
|
35
|
-
* Default value is `false`.
|
|
33
|
+
/**
|
|
34
|
+
* If `false` hide the button to move map to the current user's location.
|
|
35
|
+
* Default value is `false`.
|
|
36
36
|
*/
|
|
37
37
|
showsMyLocationButton: PropTypes.bool,
|
|
38
38
|
|
|
39
|
-
/**
|
|
40
|
-
* If `true` the app will ask for the user's location.
|
|
41
|
-
* Default value is `false`.
|
|
39
|
+
/**
|
|
40
|
+
* If `true` the app will ask for the user's location.
|
|
41
|
+
* Default value is `false`.
|
|
42
42
|
*/
|
|
43
43
|
showsMyLocation: PropTypes.bool,
|
|
44
44
|
|
|
45
|
-
/**
|
|
46
|
-
* A Boolean indicating whether the map displays buildings.
|
|
47
|
-
* Default value is `true`.
|
|
45
|
+
/**
|
|
46
|
+
* A Boolean indicating whether the map displays buildings.
|
|
47
|
+
* Default value is `true`.
|
|
48
48
|
*/
|
|
49
49
|
showsBuildings: PropTypes.bool,
|
|
50
50
|
|
|
51
|
-
/**
|
|
52
|
-
* A Boolean indicating whether the map displays POIs.
|
|
53
|
-
* Default value is `true`.
|
|
51
|
+
/**
|
|
52
|
+
* A Boolean indicating whether the map displays POIs.
|
|
53
|
+
* Default value is `true`.
|
|
54
54
|
*/
|
|
55
55
|
showsPOIs: PropTypes.bool,
|
|
56
56
|
|
|
57
|
-
/**
|
|
58
|
-
* If `false` the user won't be able to zoom the map.
|
|
59
|
-
* Default value is `true`.
|
|
57
|
+
/**
|
|
58
|
+
* If `false` the user won't be able to zoom the map.
|
|
59
|
+
* Default value is `true`.
|
|
60
60
|
*/
|
|
61
61
|
zoomGesturesEnabled: PropTypes.bool,
|
|
62
62
|
|
|
63
|
-
/**
|
|
64
|
-
* If `false` the user won't be able to scroll the map.
|
|
65
|
-
* Default value is `true`.
|
|
63
|
+
/**
|
|
64
|
+
* If `false` the user won't be able to scroll the map.
|
|
65
|
+
* Default value is `true`.
|
|
66
66
|
*/
|
|
67
67
|
scrollGesturesEnabled: PropTypes.bool,
|
|
68
68
|
|
|
69
|
-
/**
|
|
70
|
-
* If `false` the user won't be able to pinch/rotate the map.
|
|
71
|
-
* Default value is `true`.
|
|
69
|
+
/**
|
|
70
|
+
* If `false` the user won't be able to pinch/rotate the map.
|
|
71
|
+
* Default value is `true`.
|
|
72
72
|
*/
|
|
73
73
|
rotateGesturesEnabled: PropTypes.bool,
|
|
74
74
|
|
|
75
|
-
/**
|
|
76
|
-
* If `false` the user won't be able to tilt the map.
|
|
77
|
-
* Default value is `true`.
|
|
75
|
+
/**
|
|
76
|
+
* If `false` the user won't be able to tilt the map.
|
|
77
|
+
* Default value is `true`.
|
|
78
78
|
*/
|
|
79
79
|
tiltGesturesEnabled: PropTypes.bool,
|
|
80
80
|
|
|
81
|
-
/**
|
|
82
|
-
* The camera view position.
|
|
81
|
+
/**
|
|
82
|
+
* The camera view position.
|
|
83
83
|
*/
|
|
84
84
|
camera: CameraShape,
|
|
85
85
|
|
|
86
|
-
/**
|
|
87
|
-
* Type of map tiles to be rendered.
|
|
86
|
+
/**
|
|
87
|
+
* Type of map tiles to be rendered.
|
|
88
88
|
*/
|
|
89
89
|
mapType: PropTypes.oneOf(['roadmap', 'satellite', 'hybrid']),
|
|
90
90
|
|
|
91
|
-
/**
|
|
92
|
-
* Callback that is called once the map is fully loaded.
|
|
93
|
-
* @platform android
|
|
91
|
+
/**
|
|
92
|
+
* Callback that is called once the map is fully loaded.
|
|
93
|
+
* @platform android
|
|
94
94
|
*/
|
|
95
95
|
onMapReady: PropTypes.func,
|
|
96
96
|
|
|
97
|
-
/**
|
|
98
|
-
* Callback that is called when user taps on the map.
|
|
97
|
+
/**
|
|
98
|
+
* Callback that is called when user taps on the map.
|
|
99
99
|
*/
|
|
100
100
|
onPress: PropTypes.func,
|
|
101
101
|
|
|
102
|
-
/**
|
|
103
|
-
* Callback that is called when user taps on the POIs
|
|
102
|
+
/**
|
|
103
|
+
* Callback that is called when user taps on the POIs
|
|
104
104
|
*/
|
|
105
105
|
onPoiPress: PropTypes.func,
|
|
106
106
|
|
|
107
|
-
/**
|
|
108
|
-
* Callback that is called when user taps on the Buildings
|
|
107
|
+
/**
|
|
108
|
+
* Callback that is called when user taps on the Buildings
|
|
109
109
|
*/
|
|
110
110
|
onBuildingPress: PropTypes.func,
|
|
111
111
|
|
|
112
|
-
/**
|
|
113
|
-
* Callback that is called when user taps on the Places
|
|
112
|
+
/**
|
|
113
|
+
* Callback that is called when user taps on the Places
|
|
114
114
|
*/
|
|
115
115
|
onPlacePress: PropTypes.func,
|
|
116
116
|
|
|
117
|
-
/**
|
|
118
|
-
* Callback that is called when user taps on the Data Source Features
|
|
117
|
+
/**
|
|
118
|
+
* Callback that is called when user taps on the Data Source Features
|
|
119
119
|
*/
|
|
120
120
|
onDataSourceFeaturePress: PropTypes.func,
|
|
121
121
|
|
|
122
|
-
/**
|
|
123
|
-
* Callback that is called when moving camera
|
|
122
|
+
/**
|
|
123
|
+
* Callback that is called when moving camera
|
|
124
124
|
*/
|
|
125
125
|
onCameraMove: PropTypes.func,
|
|
126
126
|
|
|
127
|
-
/**
|
|
128
|
-
* Callback that is called when camera start moving
|
|
127
|
+
/**
|
|
128
|
+
* Callback that is called when camera start moving
|
|
129
129
|
*/
|
|
130
130
|
onCameraMoveStart: PropTypes.func,
|
|
131
131
|
|
|
132
|
-
/**
|
|
133
|
-
* Callback that is called when camera idle
|
|
132
|
+
/**
|
|
133
|
+
* Callback that is called when camera idle
|
|
134
134
|
*/
|
|
135
135
|
onCameraIdle: PropTypes.func,
|
|
136
136
|
|
|
137
|
-
/**
|
|
138
|
-
* Callback that is called when user taps on location Button
|
|
137
|
+
/**
|
|
138
|
+
* Callback that is called when user taps on location Button
|
|
139
139
|
*/
|
|
140
140
|
onMyLocationButtonPress: PropTypes.func
|
|
141
141
|
};
|
|
@@ -305,14 +305,14 @@ class MFMapView extends React.Component {
|
|
|
305
305
|
|
|
306
306
|
return Promise.reject('cameraForBounds not supported on this platform');
|
|
307
307
|
}
|
|
308
|
-
/**
|
|
309
|
-
* Convert a map coordinate to screen point
|
|
310
|
-
*
|
|
311
|
-
* @param coordinate Coordinate
|
|
312
|
-
* @param [coordinate.latitude] Latitude
|
|
313
|
-
* @param [coordinate.longitude] Longitude
|
|
314
|
-
*
|
|
315
|
-
* @return Promise Promise with the point ({ x: Number, y: Number })
|
|
308
|
+
/**
|
|
309
|
+
* Convert a map coordinate to screen point
|
|
310
|
+
*
|
|
311
|
+
* @param coordinate Coordinate
|
|
312
|
+
* @param [coordinate.latitude] Latitude
|
|
313
|
+
* @param [coordinate.longitude] Longitude
|
|
314
|
+
*
|
|
315
|
+
* @return Promise Promise with the point ({ x: Number, y: Number })
|
|
316
316
|
*/
|
|
317
317
|
|
|
318
318
|
|
|
@@ -325,14 +325,14 @@ class MFMapView extends React.Component {
|
|
|
325
325
|
|
|
326
326
|
return Promise.reject('pointForCoordinate not supported on this platform');
|
|
327
327
|
}
|
|
328
|
-
/**
|
|
329
|
-
* Convert a screen point to a map coordinate
|
|
330
|
-
*
|
|
331
|
-
* @param point Point
|
|
332
|
-
* @param [point.x] X
|
|
333
|
-
* @param [point.x] Y
|
|
334
|
-
*
|
|
335
|
-
* @return Promise Promise with the coordinate ({ latitude: Number, longitude: Number })
|
|
328
|
+
/**
|
|
329
|
+
* Convert a screen point to a map coordinate
|
|
330
|
+
*
|
|
331
|
+
* @param point Point
|
|
332
|
+
* @param [point.x] X
|
|
333
|
+
* @param [point.x] Y
|
|
334
|
+
*
|
|
335
|
+
* @return Promise Promise with the coordinate ({ latitude: Number, longitude: Number })
|
|
336
336
|
*/
|
|
337
337
|
|
|
338
338
|
|
|
@@ -369,7 +369,19 @@ class MFMapView extends React.Component {
|
|
|
369
369
|
_runCommand(name, args) {
|
|
370
370
|
switch (Platform.OS) {
|
|
371
371
|
case 'android':
|
|
372
|
-
|
|
372
|
+
{
|
|
373
|
+
if (!UIManager || typeof UIManager.dispatchViewManagerCommand !== 'function') {
|
|
374
|
+
return Promise.reject('UIManager.dispatchViewManagerCommand is unavailable on this React Native version');
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
const commandId = this._uiManagerCommand(name);
|
|
378
|
+
|
|
379
|
+
if (commandId == null) {
|
|
380
|
+
return Promise.reject(`Cannot find native command "${name}" for RMFMapView`);
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
return UIManager.dispatchViewManagerCommand(this._getHandle(), commandId, args);
|
|
384
|
+
}
|
|
373
385
|
|
|
374
386
|
case 'ios':
|
|
375
387
|
return this._mapManagerCommand(name)(this._getHandle(), ...args);
|
|
@@ -380,16 +392,21 @@ class MFMapView extends React.Component {
|
|
|
380
392
|
}
|
|
381
393
|
|
|
382
394
|
_uiManagerCommand(name) {
|
|
383
|
-
const
|
|
395
|
+
const uiManager = UIManager || NativeModules.UIManager;
|
|
384
396
|
const componentName = "RMFMapView";
|
|
385
397
|
|
|
386
|
-
if (!
|
|
398
|
+
if (!uiManager) {
|
|
399
|
+
return null;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
if (!uiManager.getViewManagerConfig) {
|
|
387
403
|
// RN < 0.58
|
|
388
|
-
return
|
|
404
|
+
return uiManager[componentName].Commands[name];
|
|
389
405
|
} // RN >= 0.58
|
|
390
406
|
|
|
391
407
|
|
|
392
|
-
|
|
408
|
+
const config = uiManager.getViewManagerConfig(componentName);
|
|
409
|
+
return config && config.Commands ? config.Commands[name] : null;
|
|
393
410
|
}
|
|
394
411
|
|
|
395
412
|
_mapManagerCommand(name) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["PropTypes","React","ViewPropTypes","ColorPropType","AreaFocusManager","AreaFocuser","MFPolygon","requireNativeComponent","Platform","NativeModules","findNodeHandle","CameraShape","shape","target","latitude","number","isRequired","longitude","zoom","bearing","tilt","viewPropTypes","View","propTypes","mapID","string","mapStyle","showsMyLocationButton","bool","showsMyLocation","showsBuildings","showsPOIs","zoomGesturesEnabled","scrollGesturesEnabled","rotateGesturesEnabled","tiltGesturesEnabled","camera","mapType","oneOf","onMapReady","func","onPress","onPoiPress","onBuildingPress","onPlacePress","onDataSourceFeaturePress","onCameraMove","onCameraMoveStart","onCameraIdle","onMyLocationButtonPress","MFMapView","Component","constructor","props","areaFocusManager","areaFocuser","state","isReady","OS","managedPolygons","_onMapReady","bind","_ref","_addPolygon","polygon","id","trim","length","_polygon","setState","prevState","_removePolygon","_clearManagedPolygons","ref","map","getCamera","Map4dMap","_getHandle","_runCommand","Promise","reject","getBounds","getMyLocation","animateCamera","moveCamera","setMyLocationEnabled","enable","setPOIsEnabled","setZoomGesturesEnabled","setScrollGesturesEnabled","setRotateGesturesEnabled","setTiltGesturesEnabled","setAllGesturesEnabled","setTime","time","t","Date","parse","isNaN","console","log","fitBounds","boundsData","cameraForBounds","pointForCoordinate","coordinate","coordinateForPoint","point","focusArea","focusOptions","resolve","focus","clearFocusedArea","clear","name","args","UIManager","dispatchViewManagerCommand","_uiManagerCommand","_mapManagerCommand","componentName","getViewManagerConfig","Commands","render","children","restProps","Object","values","style","coordinates","holes","fillColor","strokeColor","strokeWidth","zIndex","RMFMapView"],"sources":["MFMapView.js"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\nimport {ViewPropTypes, ColorPropType} from 'deprecated-react-native-prop-types';\nimport {AreaFocusManager} from './extends/AreaFocusManager';\nimport {AreaFocuser} from './extends/AreaFocuser';\nimport {MFPolygon} from './MFPolygon';\nimport {\n requireNativeComponent,\n Platform,\n NativeModules,\n findNodeHandle\n} from 'react-native';\n\nconst CameraShape = PropTypes.shape({\n target: PropTypes.shape({\n latitude: PropTypes.number.isRequired,\n longitude: PropTypes.number.isRequired,\n }),\n zoom: PropTypes.number.isRequired,\n bearing: PropTypes.number.isRequired,\n tilt: PropTypes.number.isRequired,\n});\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 * An opaque identifier for a custom map configuration.\n */\n mapID: PropTypes.string,\n\n /**\n * Map style by string for a custom map configuration.\n */\n mapStyle: PropTypes.string,\n\n /**\n * If `false` hide the button to move map to the current user's location.\n * Default value is `false`.\n */\n showsMyLocationButton: PropTypes.bool,\n\n /**\n * If `true` the app will ask for the user's location.\n * Default value is `false`.\n */\n showsMyLocation: PropTypes.bool,\n\n /**\n * A Boolean indicating whether the map displays buildings.\n * Default value is `true`.\n */\n showsBuildings: PropTypes.bool,\n\n /**\n * A Boolean indicating whether the map displays POIs.\n * Default value is `true`.\n */\n showsPOIs: PropTypes.bool,\n\n /**\n * If `false` the user won't be able to zoom the map.\n * Default value is `true`.\n */\n zoomGesturesEnabled: PropTypes.bool,\n\n /**\n * If `false` the user won't be able to scroll the map.\n * Default value is `true`.\n */\n scrollGesturesEnabled: PropTypes.bool,\n\n /**\n * If `false` the user won't be able to pinch/rotate the map.\n * Default value is `true`.\n */\n rotateGesturesEnabled: PropTypes.bool,\n\n /**\n * If `false` the user won't be able to tilt the map.\n * Default value is `true`.\n */\n tiltGesturesEnabled: PropTypes.bool,\n\n /**\n * The camera view position.\n */\n camera: CameraShape,\n\n /**\n * Type of map tiles to be rendered.\n */\n mapType: PropTypes.oneOf(['roadmap', 'satellite', 'hybrid']),\n\n /**\n * Callback that is called once the map is fully loaded.\n * @platform android\n */\n onMapReady: PropTypes.func,\n\n /**\n * Callback that is called when user taps on the map.\n */\n onPress: PropTypes.func,\n\n /**\n * Callback that is called when user taps on the POIs\n */\n onPoiPress: PropTypes.func,\n\n /**\n * Callback that is called when user taps on the Buildings\n */\n onBuildingPress: PropTypes.func,\n\n /**\n * Callback that is called when user taps on the Places\n */\n onPlacePress: PropTypes.func,\n\n /**\n * Callback that is called when user taps on the Data Source Features\n */\n onDataSourceFeaturePress: PropTypes.func,\n\n /**\n * Callback that is called when moving camera\n */\n onCameraMove: PropTypes.func,\n\n /**\n * Callback that is called when camera start moving\n */\n onCameraMoveStart: PropTypes.func,\n\n /**\n * Callback that is called when camera idle\n */\n onCameraIdle: PropTypes.func,\n\n /**\n * Callback that is called when user taps on location Button\n */\n onMyLocationButtonPress: PropTypes.func,\n\n};\n\n\nclass MFMapView extends React.Component {\n constructor(props) {\n super(props);\n this.areaFocusManager = new AreaFocusManager(this);\n this.areaFocuser = new AreaFocuser(this.areaFocusManager);\n this.state = {\n isReady: Platform.OS === 'ios',\n managedPolygons: {},\n };\n\n this._onMapReady = this._onMapReady.bind(this);\n this._ref = this._ref.bind(this);\n }\n\n _addPolygon(polygon) {\n if (polygon == null || typeof polygon !== 'object') {\n return null;\n }\n\n const id =\n typeof polygon.id === 'string' && polygon.id.trim().length > 0\n ? polygon.id\n : 'polygon-highlight-id-default';\n\n const _polygon = {\n ...polygon,\n id,\n };\n\n this.setState((prevState) => ({\n managedPolygons: {\n ...prevState.managedPolygons,\n [id]: _polygon,\n },\n }));\n\n return id;\n }\n\n _removePolygon(id) {\n if (typeof id !== 'string' || id.trim().length === 0) {\n return;\n }\n\n this.setState((prevState) => {\n if (!prevState.managedPolygons[id]) {\n return null;\n }\n\n const managedPolygons = {\n ...prevState.managedPolygons,\n };\n delete managedPolygons[id];\n\n return {\n managedPolygons,\n };\n });\n }\n\n _clearManagedPolygons() {\n this.setState({\n managedPolygons: {},\n });\n }\n\n _onMapReady() {\n const { onMapReady } = this.props;\n this.setState({ isReady: true }, () => {\n if (onMapReady) {\n onMapReady();\n }\n });\n }\n\n _ref(ref) {\n this.map = ref;\n }\n\n getCamera() {\n if (Platform.OS === 'android') {\n return NativeModules.Map4dMap.getCamera(this._getHandle());\n } else if (Platform.OS === 'ios') {\n return this._runCommand('getCamera', []);\n }\n return Promise.reject('Function not supported on this platform');\n }\n\n getBounds() {\n if (Platform.OS === 'android') {\n return NativeModules.Map4dMap.getBounds(this._getHandle());\n } else if (Platform.OS === 'ios') {\n return this._runCommand('getBounds', []);\n }\n return Promise.reject('Function not supported on this platform');\n }\n\n getMyLocation() {\n if (Platform.OS === 'android') {\n return NativeModules.Map4dMap.getMyLocation(this._getHandle());\n } else if (Platform.OS === 'ios') {\n return this._runCommand('getMyLocation', []);\n }\n return Promise.reject('Function not supported on this platform');\n }\n\n animateCamera(camera) {\n this._runCommand('animateCamera', [camera]);\n }\n\n moveCamera(camera) {\n this._runCommand('moveCamera', [camera]);\n }\n\n setMyLocationEnabled(enable) {\n this._runCommand('setMyLocationEnabled', [enable]);\n }\n\n showsMyLocationButton(enable) {\n this._runCommand('showsMyLocationButton', [enable]);\n }\n\n setPOIsEnabled(enable) {\n this._runCommand('setPOIsEnabled', [enable]);\n }\n\n setZoomGesturesEnabled(enable) {\n this._runCommand('setZoomGesturesEnabled', [enable]);\n }\n\n setScrollGesturesEnabled(enable) {\n this._runCommand('setScrollGesturesEnabled', [enable]);\n }\n\n setRotateGesturesEnabled(enable) {\n this._runCommand('setRotateGesturesEnabled', [enable]);\n }\n\n setTiltGesturesEnabled(enable) {\n this._runCommand('setTiltGesturesEnabled', [enable]);\n }\n\n setAllGesturesEnabled(enable) {\n this._runCommand('setAllGesturesEnabled', [enable]);\n }\n\n setTime(time) {\n let t = Date.parse(time)\n if (isNaN(t)) {\n console.log('time invalid')\n }\n else {\n this._runCommand('setTime', [t]);\n }\n }\n\n fitBounds(boundsData) {\n this._runCommand(\"fitBounds\", [boundsData])\n }\n\n cameraForBounds(boundsData) {\n if (Platform.OS === 'android') {\n return NativeModules.Map4dMap.cameraForBounds(\n this._getHandle(),\n boundsData\n );\n } else if (Platform.OS === 'ios') {\n return this._runCommand('cameraForBounds', [boundsData]);\n }\n return Promise.reject('cameraForBounds not supported on this platform');\n }\n\n\n /**\n * Convert a map coordinate to screen point\n *\n * @param coordinate Coordinate\n * @param [coordinate.latitude] Latitude\n * @param [coordinate.longitude] Longitude\n *\n * @return Promise Promise with the point ({ x: Number, y: Number })\n */\n pointForCoordinate(coordinate) {\n if (Platform.OS === 'android') {\n return NativeModules.Map4dMap.pointForCoordinate(\n this._getHandle(),\n coordinate\n );\n } else if (Platform.OS === 'ios') {\n return this._runCommand('pointForCoordinate', [coordinate]);\n }\n return Promise.reject('pointForCoordinate not supported on this platform');\n }\n\n /**\n * Convert a screen point to a map coordinate\n *\n * @param point Point\n * @param [point.x] X\n * @param [point.x] Y\n *\n * @return Promise Promise with the coordinate ({ latitude: Number, longitude: Number })\n */\n coordinateForPoint(point) {\n if (Platform.OS === 'android') {\n return NativeModules.Map4dMap.coordinateForPoint(\n this._getHandle(),\n point\n );\n } else if (Platform.OS === 'ios') {\n return this._runCommand('coordinateForPoint', [point]);\n }\n return Promise.reject('coordinateForPoint not supported on this platform');\n }\n\n focusArea(focusOptions) {\n if (!this.areaFocusManager) {\n return Promise.resolve(null)\n }\n\n return this.areaFocusManager.focus(focusOptions)\n }\n\n clearFocusedArea() {\n if (!this.areaFocusManager) {\n return\n }\n this.areaFocusManager.clear()\n }\n\n _getHandle() {\n return findNodeHandle(this.map);\n }\n\n _runCommand(name, args) {\n switch (Platform.OS) {\n case 'android':\n return NativeModules.UIManager.dispatchViewManagerCommand(\n this._getHandle(),\n this._uiManagerCommand(name),\n args\n );\n\n case 'ios':\n return this._mapManagerCommand(name)(this._getHandle(), ...args);\n\n default:\n return Promise.reject(`Invalid platform was passed: ${Platform.OS}`);\n }\n }\n\n _uiManagerCommand(name) {\n const UIManager = NativeModules.UIManager;\n const componentName = \"RMFMapView\";\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[`RMFMapView`][name];\n }\n\n render() {\n let props;\n const { children, ...restProps } = this.props;\n const managedPolygons = Object.values(this.state.managedPolygons);\n\n if (this.state.isReady) {\n props = {\n style: this.props.style,\n onMapReady: this._onMapReady,\n ...restProps,\n children: (\n <React.Fragment>\n {children}\n {managedPolygons.map((polygon) => (\n <MFPolygon\n key={polygon.id}\n coordinates={polygon.coordinates}\n holes={polygon.holes}\n fillColor={polygon.fillColor}\n strokeColor={polygon.strokeColor}\n strokeWidth={polygon.strokeWidth}\n zIndex={polygon.zIndex}\n />\n ))}\n </React.Fragment>\n ),\n };\n } else {\n props = {\n style: this.props.style,\n onMapReady: this._onMapReady\n };\n }\n\n return <RMFMapView\n {...props}\n ref={this._ref}\n />;\n }\n}\n\nMFMapView.propTypes = propTypes;\nvar RMFMapView = requireNativeComponent(`RMFMapView`, MFMapView);\n\n\nexport { MFMapView }"],"mappings":";;AAAA,OAAOA,SAAP,MAAsB,YAAtB;AACA,OAAOC,KAAP,MAAkB,OAAlB;AACA,SAAQC,aAAR,EAAuBC,aAAvB,QAA2C,oCAA3C;AACA,SAAQC,gBAAR,QAA+B,4BAA/B;AACA,SAAQC,WAAR,QAA0B,uBAA1B;AACA,SAAQC,SAAR,QAAwB,aAAxB;AACA,SACEC,sBADF,EAEEC,QAFF,EAGEC,aAHF,EAIEC,cAJF,QAKO,cALP;AAOA,MAAMC,WAAW,GAAGX,SAAS,CAACY,KAAV,CAAgB;EAClCC,MAAM,EAAEb,SAAS,CAACY,KAAV,CAAgB;IACtBE,QAAQ,EAAEd,SAAS,CAACe,MAAV,CAAiBC,UADL;IAEtBC,SAAS,EAAEjB,SAAS,CAACe,MAAV,CAAiBC;EAFN,CAAhB,CAD0B;EAKlCE,IAAI,EAAElB,SAAS,CAACe,MAAV,CAAiBC,UALW;EAMlCG,OAAO,EAAEnB,SAAS,CAACe,MAAV,CAAiBC,UANQ;EAOlCI,IAAI,EAAEpB,SAAS,CAACe,MAAV,CAAiBC;AAPW,CAAhB,CAApB,C,CAUA;;AACA,MAAMK,aAAa,GAAGnB,aAAa,IAAIoB,IAAI,CAACC,SAA5C;AAEA,MAAMA,SAAS,GAAG,EAChB,GAAGF,aADa;;EAGhB;AACF;AACA;EACEG,KAAK,EAAExB,SAAS,CAACyB,MAND;;EAQhB;AACF;AACA;EACEC,QAAQ,EAAE1B,SAAS,CAACyB,MAXJ;;EAahB;AACF;AACA;AACA;EACEE,qBAAqB,EAAE3B,SAAS,CAAC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E,WAFvB;UAGE,KAAK,EAAEjE,OAAO,CAACkE,KAHjB;UAIE,SAAS,EAAElE,OAAO,CAACmE,SAJrB;UAKE,WAAW,EAAEnE,OAAO,CAACoE,WALvB;UAME,WAAW,EAAEpE,OAAO,CAACqE,WANvB;UAOE,MAAM,EAAErE,OAAO,CAACsE;QAPlB,EADD,CAFH;MALI,CAAR;IAqBD,CAtBD,MAsBO;MACLjF,KAAK,GAAG;QACN2E,KAAK,EAAE,KAAK3E,KAAL,CAAW2E,KADZ;QAENzF,UAAU,EAAE,KAAKqB;MAFX,CAAR;IAID;;IAED,oBAAO,oBAAC,UAAD,eACDP,KADC;MAEL,GAAG,EAAE,KAAKS;IAFL,GAAP;EAID;;AAlTqC;;AAqTxCZ,SAAS,CAAC3B,SAAV,GAAsBA,SAAtB;AACA,IAAIgH,UAAU,GAAGhI,sBAAsB,CAAE,YAAF,EAAe2C,SAAf,CAAvC;AAGA,SAASA,SAAT"}
|
|
1
|
+
{"version":3,"names":["PropTypes","React","ViewPropTypes","ColorPropType","AreaFocusManager","AreaFocuser","MFPolygon","requireNativeComponent","Platform","UIManager","NativeModules","findNodeHandle","CameraShape","shape","target","latitude","number","isRequired","longitude","zoom","bearing","tilt","viewPropTypes","View","propTypes","mapID","string","mapStyle","showsMyLocationButton","bool","showsMyLocation","showsBuildings","showsPOIs","zoomGesturesEnabled","scrollGesturesEnabled","rotateGesturesEnabled","tiltGesturesEnabled","camera","mapType","oneOf","onMapReady","func","onPress","onPoiPress","onBuildingPress","onPlacePress","onDataSourceFeaturePress","onCameraMove","onCameraMoveStart","onCameraIdle","onMyLocationButtonPress","MFMapView","Component","constructor","props","areaFocusManager","areaFocuser","state","isReady","OS","managedPolygons","_onMapReady","bind","_ref","_addPolygon","polygon","id","trim","length","_polygon","setState","prevState","_removePolygon","_clearManagedPolygons","ref","map","getCamera","Map4dMap","_getHandle","_runCommand","Promise","reject","getBounds","getMyLocation","animateCamera","moveCamera","setMyLocationEnabled","enable","setPOIsEnabled","setZoomGesturesEnabled","setScrollGesturesEnabled","setRotateGesturesEnabled","setTiltGesturesEnabled","setAllGesturesEnabled","setTime","time","t","Date","parse","isNaN","console","log","fitBounds","boundsData","cameraForBounds","pointForCoordinate","coordinate","coordinateForPoint","point","focusArea","focusOptions","resolve","focus","clearFocusedArea","clear","name","args","dispatchViewManagerCommand","commandId","_uiManagerCommand","_mapManagerCommand","uiManager","componentName","getViewManagerConfig","Commands","config","render","children","restProps","Object","values","style","coordinates","holes","fillColor","strokeColor","strokeWidth","zIndex","RMFMapView"],"sources":["MFMapView.js"],"sourcesContent":["import PropTypes from 'prop-types';\r\nimport React from 'react';\r\nimport {ViewPropTypes, ColorPropType} from 'deprecated-react-native-prop-types';\r\nimport {AreaFocusManager} from './extends/AreaFocusManager';\r\nimport {AreaFocuser} from './extends/AreaFocuser';\r\nimport {MFPolygon} from './MFPolygon';\r\nimport {\r\n requireNativeComponent,\r\n Platform,\r\n UIManager,\r\n NativeModules,\r\n findNodeHandle\r\n} from 'react-native';\r\n\r\nconst CameraShape = PropTypes.shape({\r\n target: PropTypes.shape({\r\n latitude: PropTypes.number.isRequired,\r\n longitude: PropTypes.number.isRequired,\r\n }),\r\n zoom: PropTypes.number.isRequired,\r\n bearing: PropTypes.number.isRequired,\r\n tilt: PropTypes.number.isRequired,\r\n});\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 opaque identifier for a custom map configuration.\r\n */\r\n mapID: PropTypes.string,\r\n\r\n /**\r\n * Map style by string for a custom map configuration.\r\n */\r\n mapStyle: PropTypes.string,\r\n\r\n /**\r\n * If `false` hide the button to move map to the current user's location.\r\n * Default value is `false`.\r\n */\r\n showsMyLocationButton: PropTypes.bool,\r\n\r\n /**\r\n * If `true` the app will ask for the user's location.\r\n * Default value is `false`.\r\n */\r\n showsMyLocation: PropTypes.bool,\r\n\r\n /**\r\n * A Boolean indicating whether the map displays buildings.\r\n * Default value is `true`.\r\n */\r\n showsBuildings: PropTypes.bool,\r\n\r\n /**\r\n * A Boolean indicating whether the map displays POIs.\r\n * Default value is `true`.\r\n */\r\n showsPOIs: PropTypes.bool,\r\n\r\n /**\r\n * If `false` the user won't be able to zoom the map.\r\n * Default value is `true`.\r\n */\r\n zoomGesturesEnabled: PropTypes.bool,\r\n\r\n /**\r\n * If `false` the user won't be able to scroll the map.\r\n * Default value is `true`.\r\n */\r\n scrollGesturesEnabled: PropTypes.bool,\r\n\r\n /**\r\n * If `false` the user won't be able to pinch/rotate the map.\r\n * Default value is `true`.\r\n */\r\n rotateGesturesEnabled: PropTypes.bool,\r\n\r\n /**\r\n * If `false` the user won't be able to tilt the map.\r\n * Default value is `true`.\r\n */\r\n tiltGesturesEnabled: PropTypes.bool,\r\n\r\n /**\r\n * The camera view position.\r\n */\r\n camera: CameraShape,\r\n\r\n /**\r\n * Type of map tiles to be rendered.\r\n */\r\n mapType: PropTypes.oneOf(['roadmap', 'satellite', 'hybrid']),\r\n\r\n /**\r\n * Callback that is called once the map is fully loaded.\r\n * @platform android\r\n */\r\n onMapReady: PropTypes.func,\r\n\r\n /**\r\n * Callback that is called when user taps on the map.\r\n */\r\n onPress: PropTypes.func,\r\n\r\n /**\r\n * Callback that is called when user taps on the POIs\r\n */\r\n onPoiPress: PropTypes.func,\r\n\r\n /**\r\n * Callback that is called when user taps on the Buildings\r\n */\r\n onBuildingPress: PropTypes.func,\r\n\r\n /**\r\n * Callback that is called when user taps on the Places\r\n */\r\n onPlacePress: PropTypes.func,\r\n\r\n /**\r\n * Callback that is called when user taps on the Data Source Features\r\n */\r\n onDataSourceFeaturePress: PropTypes.func,\r\n\r\n /**\r\n * Callback that is called when moving camera\r\n */\r\n onCameraMove: PropTypes.func,\r\n\r\n /**\r\n * Callback that is called when camera start moving\r\n */\r\n onCameraMoveStart: PropTypes.func,\r\n\r\n /**\r\n * Callback that is called when camera idle\r\n */\r\n onCameraIdle: PropTypes.func,\r\n\r\n /**\r\n * Callback that is called when user taps on location Button\r\n */\r\n onMyLocationButtonPress: PropTypes.func,\r\n\r\n};\r\n\r\n\r\nclass MFMapView extends React.Component {\r\n constructor(props) {\r\n super(props);\r\n this.areaFocusManager = new AreaFocusManager(this);\r\n this.areaFocuser = new AreaFocuser(this.areaFocusManager);\r\n this.state = {\r\n isReady: Platform.OS === 'ios',\r\n managedPolygons: {},\r\n };\r\n\r\n this._onMapReady = this._onMapReady.bind(this);\r\n this._ref = this._ref.bind(this);\r\n }\r\n\r\n _addPolygon(polygon) {\r\n if (polygon == null || typeof polygon !== 'object') {\r\n return null;\r\n }\r\n\r\n const id =\r\n typeof polygon.id === 'string' && polygon.id.trim().length > 0\r\n ? polygon.id\r\n : 'polygon-highlight-id-default';\r\n\r\n const _polygon = {\r\n ...polygon,\r\n id,\r\n };\r\n\r\n this.setState((prevState) => ({\r\n managedPolygons: {\r\n ...prevState.managedPolygons,\r\n [id]: _polygon,\r\n },\r\n }));\r\n\r\n return id;\r\n }\r\n\r\n _removePolygon(id) {\r\n if (typeof id !== 'string' || id.trim().length === 0) {\r\n return;\r\n }\r\n\r\n this.setState((prevState) => {\r\n if (!prevState.managedPolygons[id]) {\r\n return null;\r\n }\r\n\r\n const managedPolygons = {\r\n ...prevState.managedPolygons,\r\n };\r\n delete managedPolygons[id];\r\n\r\n return {\r\n managedPolygons,\r\n };\r\n });\r\n }\r\n\r\n _clearManagedPolygons() {\r\n this.setState({\r\n managedPolygons: {},\r\n });\r\n }\r\n\r\n _onMapReady() {\r\n const { onMapReady } = this.props;\r\n this.setState({ isReady: true }, () => {\r\n if (onMapReady) {\r\n onMapReady();\r\n }\r\n });\r\n }\r\n\r\n _ref(ref) {\r\n this.map = ref;\r\n }\r\n\r\n getCamera() {\r\n if (Platform.OS === 'android') {\r\n return NativeModules.Map4dMap.getCamera(this._getHandle());\r\n } else if (Platform.OS === 'ios') {\r\n return this._runCommand('getCamera', []);\r\n }\r\n return Promise.reject('Function not supported on this platform');\r\n }\r\n\r\n getBounds() {\r\n if (Platform.OS === 'android') {\r\n return NativeModules.Map4dMap.getBounds(this._getHandle());\r\n } else if (Platform.OS === 'ios') {\r\n return this._runCommand('getBounds', []);\r\n }\r\n return Promise.reject('Function not supported on this platform');\r\n }\r\n\r\n getMyLocation() {\r\n if (Platform.OS === 'android') {\r\n return NativeModules.Map4dMap.getMyLocation(this._getHandle());\r\n } else if (Platform.OS === 'ios') {\r\n return this._runCommand('getMyLocation', []);\r\n }\r\n return Promise.reject('Function not supported on this platform');\r\n }\r\n\r\n animateCamera(camera) {\r\n this._runCommand('animateCamera', [camera]);\r\n }\r\n\r\n moveCamera(camera) {\r\n this._runCommand('moveCamera', [camera]);\r\n }\r\n\r\n setMyLocationEnabled(enable) {\r\n this._runCommand('setMyLocationEnabled', [enable]);\r\n }\r\n\r\n showsMyLocationButton(enable) {\r\n this._runCommand('showsMyLocationButton', [enable]);\r\n }\r\n\r\n setPOIsEnabled(enable) {\r\n this._runCommand('setPOIsEnabled', [enable]);\r\n }\r\n\r\n setZoomGesturesEnabled(enable) {\r\n this._runCommand('setZoomGesturesEnabled', [enable]);\r\n }\r\n\r\n setScrollGesturesEnabled(enable) {\r\n this._runCommand('setScrollGesturesEnabled', [enable]);\r\n }\r\n\r\n setRotateGesturesEnabled(enable) {\r\n this._runCommand('setRotateGesturesEnabled', [enable]);\r\n }\r\n\r\n setTiltGesturesEnabled(enable) {\r\n this._runCommand('setTiltGesturesEnabled', [enable]);\r\n }\r\n\r\n setAllGesturesEnabled(enable) {\r\n this._runCommand('setAllGesturesEnabled', [enable]);\r\n }\r\n\r\n setTime(time) {\r\n let t = Date.parse(time)\r\n if (isNaN(t)) {\r\n console.log('time invalid')\r\n }\r\n else {\r\n this._runCommand('setTime', [t]);\r\n }\r\n }\r\n\r\n fitBounds(boundsData) {\r\n this._runCommand(\"fitBounds\", [boundsData])\r\n }\r\n\r\n cameraForBounds(boundsData) {\r\n if (Platform.OS === 'android') {\r\n return NativeModules.Map4dMap.cameraForBounds(\r\n this._getHandle(),\r\n boundsData\r\n );\r\n } else if (Platform.OS === 'ios') {\r\n return this._runCommand('cameraForBounds', [boundsData]);\r\n }\r\n return Promise.reject('cameraForBounds not supported on this platform');\r\n }\r\n\r\n\r\n /**\r\n * Convert a map coordinate to screen point\r\n *\r\n * @param coordinate Coordinate\r\n * @param [coordinate.latitude] Latitude\r\n * @param [coordinate.longitude] Longitude\r\n *\r\n * @return Promise Promise with the point ({ x: Number, y: Number })\r\n */\r\n pointForCoordinate(coordinate) {\r\n if (Platform.OS === 'android') {\r\n return NativeModules.Map4dMap.pointForCoordinate(\r\n this._getHandle(),\r\n coordinate\r\n );\r\n } else if (Platform.OS === 'ios') {\r\n return this._runCommand('pointForCoordinate', [coordinate]);\r\n }\r\n return Promise.reject('pointForCoordinate not supported on this platform');\r\n }\r\n\r\n /**\r\n * Convert a screen point to a map coordinate\r\n *\r\n * @param point Point\r\n * @param [point.x] X\r\n * @param [point.x] Y\r\n *\r\n * @return Promise Promise with the coordinate ({ latitude: Number, longitude: Number })\r\n */\r\n coordinateForPoint(point) {\r\n if (Platform.OS === 'android') {\r\n return NativeModules.Map4dMap.coordinateForPoint(\r\n this._getHandle(),\r\n point\r\n );\r\n } else if (Platform.OS === 'ios') {\r\n return this._runCommand('coordinateForPoint', [point]);\r\n }\r\n return Promise.reject('coordinateForPoint not supported on this platform');\r\n }\r\n\r\n focusArea(focusOptions) {\r\n if (!this.areaFocusManager) {\r\n return Promise.resolve(null)\r\n }\r\n\r\n return this.areaFocusManager.focus(focusOptions)\r\n }\r\n\r\n clearFocusedArea() {\r\n if (!this.areaFocusManager) {\r\n return\r\n }\r\n this.areaFocusManager.clear()\r\n }\r\n\r\n _getHandle() {\r\n return findNodeHandle(this.map);\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 Promise.reject('UIManager.dispatchViewManagerCommand is unavailable on this React Native version')\r\n }\r\n\r\n const commandId = this._uiManagerCommand(name)\r\n if (commandId == null) {\r\n return Promise.reject(`Cannot find native command \"${name}\" for RMFMapView`)\r\n }\r\n\r\n return UIManager.dispatchViewManagerCommand(\r\n this._getHandle(),\r\n commandId,\r\n args\r\n );\r\n }\r\n\r\n case 'ios':\r\n return this._mapManagerCommand(name)(this._getHandle(), ...args);\r\n\r\n default:\r\n return Promise.reject(`Invalid platform was passed: ${Platform.OS}`);\r\n }\r\n }\r\n\r\n _uiManagerCommand(name) {\r\n const uiManager = UIManager || NativeModules.UIManager;\r\n const componentName = \"RMFMapView\";\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 return uiManager[componentName].Commands[name];\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[`RMFMapView`][name];\r\n }\r\n\r\n render() {\r\n let props;\r\n const { children, ...restProps } = this.props;\r\n const managedPolygons = Object.values(this.state.managedPolygons);\r\n\r\n if (this.state.isReady) {\r\n props = {\r\n style: this.props.style,\r\n onMapReady: this._onMapReady,\r\n ...restProps,\r\n children: (\r\n <React.Fragment>\r\n {children}\r\n {managedPolygons.map((polygon) => (\r\n <MFPolygon\r\n key={polygon.id}\r\n coordinates={polygon.coordinates}\r\n holes={polygon.holes}\r\n fillColor={polygon.fillColor}\r\n strokeColor={polygon.strokeColor}\r\n strokeWidth={polygon.strokeWidth}\r\n zIndex={polygon.zIndex}\r\n />\r\n ))}\r\n </React.Fragment>\r\n ),\r\n };\r\n } else {\r\n props = {\r\n style: this.props.style,\r\n onMapReady: this._onMapReady\r\n };\r\n }\r\n\r\n return <RMFMapView\r\n {...props}\r\n ref={this._ref}\r\n />;\r\n }\r\n}\r\n\r\nMFMapView.propTypes = propTypes;\r\nvar RMFMapView = requireNativeComponent(`RMFMapView`, MFMapView);\r\n\r\n\r\nexport { MFMapView }"],"mappings":";;AAAA,OAAOA,SAAP,MAAsB,YAAtB;AACA,OAAOC,KAAP,MAAkB,OAAlB;AACA,SAAQC,aAAR,EAAuBC,aAAvB,QAA2C,oCAA3C;AACA,SAAQC,gBAAR,QAA+B,4BAA/B;AACA,SAAQC,WAAR,QAA0B,uBAA1B;AACA,SAAQC,SAAR,QAAwB,aAAxB;AACA,SACEC,sBADF,EAEEC,QAFF,EAGEC,SAHF,EAIEC,aAJF,EAKEC,cALF,QAMO,cANP;AAQA,MAAMC,WAAW,GAAGZ,SAAS,CAACa,KAAV,CAAgB;EAClCC,MAAM,EAAEd,SAAS,CAACa,KAAV,CAAgB;IACtBE,QAAQ,EAAEf,SAAS,CAACgB,MAAV,CAAiBC,UADL;IAEtBC,SAAS,EAAElB,SAAS,CAACgB,MAAV,CAAiBC;EAFN,CAAhB,CAD0B;EAKlCE,IAAI,EAAEnB,SAAS,CAACgB,MAAV,CAAiBC,UALW;EAMlCG,OAAO,EAAEpB,SAAS,CAACgB,MAAV,CAAiBC,UANQ;EAOlCI,IAAI,EAAErB,SAAS,CAACgB,MAAV,CAAiBC;AAPW,CAAhB,CAApB,C,CAUA;;AACA,MAAMK,aAAa,GAAGpB,aAAa,IAAIqB,IAAI,CAACC,SAA5C;AAEA,MAAMA,SAAS,GAAG,EAChB,GAAGF,aADa;;EAGhB;AACF;AACA;EACEG,KAAK,EAAEzB,SAAS,CAAC0B,MAND;;EAQhB;AACF;AACA;EACEC,QAAQ,EAAE3B,SAAS,CAAC0B,MAXJ;;EAahB;AACF;AACA;AACA;EACEE,qBAAqB,EAAE5B,SAAS,CAAC6B,IAjBjB;;EAmBhB;AACF;AACA;AACA;EACEC,eAAe,EAAE9B,SAAS,CAAC6B,IAvBX;;EAyBhB;AACF;AACA;AACA;EACEE,cAAc,EAAE/B,SAAS,CAAC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