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
|
@@ -21,60 +21,60 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
21
21
|
const viewPropTypes = _deprecatedReactNativePropTypes.ViewPropTypes || View.propTypes;
|
|
22
22
|
const propTypes = { ...viewPropTypes,
|
|
23
23
|
|
|
24
|
-
/**
|
|
25
|
-
* The coordinate for the POI.
|
|
24
|
+
/**
|
|
25
|
+
* The coordinate for the POI.
|
|
26
26
|
*/
|
|
27
27
|
coordinate: _propTypes.default.shape({
|
|
28
28
|
latitude: _propTypes.default.number.isRequired,
|
|
29
29
|
longitude: _propTypes.default.number.isRequired
|
|
30
30
|
}).isRequired,
|
|
31
31
|
|
|
32
|
-
/**
|
|
33
|
-
* The title of the POI.
|
|
32
|
+
/**
|
|
33
|
+
* The title of the POI.
|
|
34
34
|
*/
|
|
35
35
|
title: _propTypes.default.string,
|
|
36
36
|
|
|
37
|
-
/**
|
|
38
|
-
* The color of the title.
|
|
37
|
+
/**
|
|
38
|
+
* The color of the title.
|
|
39
39
|
*/
|
|
40
40
|
titleColor: _deprecatedReactNativePropTypes.ColorPropType,
|
|
41
41
|
|
|
42
|
-
/**
|
|
43
|
-
* The subtile of the POI.
|
|
42
|
+
/**
|
|
43
|
+
* The subtile of the POI.
|
|
44
44
|
*/
|
|
45
45
|
subtitle: _propTypes.default.string,
|
|
46
46
|
|
|
47
|
-
/**
|
|
48
|
-
* The type of POI
|
|
47
|
+
/**
|
|
48
|
+
* The type of POI
|
|
49
49
|
*/
|
|
50
50
|
//poiType: PropTypes.oneOf(['cafe', 'atm', 'bank']),
|
|
51
51
|
poiType: _propTypes.default.string,
|
|
52
52
|
|
|
53
|
-
/**
|
|
54
|
-
* POI icon to render.
|
|
53
|
+
/**
|
|
54
|
+
* POI icon to render.
|
|
55
55
|
*/
|
|
56
56
|
icon: _propTypes.default.shape({
|
|
57
57
|
uri: _propTypes.default.any.isRequired
|
|
58
58
|
}),
|
|
59
59
|
|
|
60
|
-
/**
|
|
61
|
-
* zIndex
|
|
60
|
+
/**
|
|
61
|
+
* zIndex
|
|
62
62
|
*/
|
|
63
63
|
zIndex: _propTypes.default.number,
|
|
64
64
|
|
|
65
|
-
/**
|
|
66
|
-
* visible
|
|
65
|
+
/**
|
|
66
|
+
* visible
|
|
67
67
|
*/
|
|
68
68
|
//TODO
|
|
69
69
|
// visible: PropTypes.bool,
|
|
70
70
|
|
|
71
|
-
/**
|
|
72
|
-
* userData
|
|
71
|
+
/**
|
|
72
|
+
* userData
|
|
73
73
|
*/
|
|
74
74
|
userData: _propTypes.default.object,
|
|
75
75
|
|
|
76
|
-
/**
|
|
77
|
-
* Callback that is called when the user presses on the POI
|
|
76
|
+
/**
|
|
77
|
+
* Callback that is called when the user presses on the POI
|
|
78
78
|
*/
|
|
79
79
|
onPress: _propTypes.default.func
|
|
80
80
|
};
|
|
@@ -146,9 +146,21 @@ class MFPOI extends _react.default.Component {
|
|
|
146
146
|
_runCommand(name, args) {
|
|
147
147
|
switch (_reactNative.Platform.OS) {
|
|
148
148
|
case 'android':
|
|
149
|
-
|
|
149
|
+
{
|
|
150
|
+
if (!_reactNative.UIManager || typeof _reactNative.UIManager.dispatchViewManagerCommand !== 'function') {
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
150
153
|
|
|
151
|
-
|
|
154
|
+
const commandId = this._uiManagerCommand(name);
|
|
155
|
+
|
|
156
|
+
if (commandId == null) {
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
_reactNative.UIManager.dispatchViewManagerCommand(this._getHandle(), commandId, args);
|
|
161
|
+
|
|
162
|
+
break;
|
|
163
|
+
}
|
|
152
164
|
|
|
153
165
|
case 'ios':
|
|
154
166
|
this._mapManagerCommand(name)(this._getHandle(), ...args);
|
|
@@ -161,16 +173,22 @@ class MFPOI extends _react.default.Component {
|
|
|
161
173
|
}
|
|
162
174
|
|
|
163
175
|
_uiManagerCommand(name) {
|
|
164
|
-
const
|
|
176
|
+
const uiManager = _reactNative.UIManager || _reactNative.NativeModules.UIManager;
|
|
165
177
|
const componentName = "RMFPOI";
|
|
166
178
|
|
|
167
|
-
if (!
|
|
179
|
+
if (!uiManager) {
|
|
180
|
+
return null;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
if (!uiManager.getViewManagerConfig) {
|
|
168
184
|
// RN < 0.58
|
|
169
|
-
|
|
185
|
+
const legacyConfig = uiManager[componentName];
|
|
186
|
+
return legacyConfig && legacyConfig.Commands ? legacyConfig.Commands[name] : null;
|
|
170
187
|
} // RN >= 0.58
|
|
171
188
|
|
|
172
189
|
|
|
173
|
-
|
|
190
|
+
const config = uiManager.getViewManagerConfig(componentName);
|
|
191
|
+
return config && config.Commands ? config.Commands[name] : null;
|
|
174
192
|
}
|
|
175
193
|
|
|
176
194
|
_mapManagerCommand(name) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["viewPropTypes","ViewPropTypes","View","propTypes","coordinate","PropTypes","shape","latitude","number","isRequired","longitude","title","string","titleColor","ColorPropType","subtitle","poiType","icon","uri","any","zIndex","userData","object","onPress","func","MFPOI","React","Component","constructor","props","_onPress","bind","_ref","event","stopPropagation","ref","poi","setCoordinate","_runCommand","setTitle","setTitleColor","color","processColor","setSubTitle","setPoiType","type","setIcon","Image","resolveAssetSource","setZIndex","setUserData","_getHandle","findNodeHandle","name","args","Platform","OS","
|
|
1
|
+
{"version":3,"names":["viewPropTypes","ViewPropTypes","View","propTypes","coordinate","PropTypes","shape","latitude","number","isRequired","longitude","title","string","titleColor","ColorPropType","subtitle","poiType","icon","uri","any","zIndex","userData","object","onPress","func","MFPOI","React","Component","constructor","props","_onPress","bind","_ref","event","stopPropagation","ref","poi","setCoordinate","_runCommand","setTitle","setTitleColor","color","processColor","setSubTitle","setPoiType","type","setIcon","Image","resolveAssetSource","setZIndex","setUserData","_getHandle","findNodeHandle","name","args","Platform","OS","UIManager","dispatchViewManagerCommand","commandId","_uiManagerCommand","_mapManagerCommand","uiManager","NativeModules","componentName","getViewManagerConfig","legacyConfig","Commands","config","render","RMFPOI","requireNativeComponent"],"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;;AACA;;AACA;;AACA;;;;;;AAUA;AACA,MAAMA,aAAa,GAAGC,6CAAA,IAAiBC,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AAIpD,IAAI,GAAG,EAAX;;IACA,IAAI,KAAKY,KAAL,CAAWZ,IAAf,EAAqB;MACnB,IAAIC,GAAG,GAAG6B,kBAAA,CAAMC,kBAAN,CAAyB,KAAKnB,KAAL,CAAWZ,IAAX,CAAgBC,GAAzC,KAAiD;QAACA,GAAG,EAAE,KAAKW,KAAL,CAAWZ,IAAX,CAAgBC;MAAtB,CAA3D;MACAD,IAAI,GAAG;QAAEC,GAAG,EAAEA,GAAG,CAACA;MAAX,CAAP;IACD;;IACD,oBAAO,6BAAC,MAAD,eACD,KAAKW,KADJ;MAEL,IAAI,EAAEZ,IAFD;MAGL,GAAG,EAAE,KAAKe,IAHL;MAIL,OAAO,EAAE,KAAKF;IAJT,GAAP;EAMD;;AAhHiC;;;AAmHpCL,KAAK,CAACtB,SAAN,GAAkBA,SAAlB;AAEA,IAAImE,MAAM,GAAG,IAAAC,mCAAA,EAAwB,QAAxB,EAAiC9C,KAAjC,CAAb"}
|
|
@@ -21,60 +21,60 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
21
21
|
const viewPropTypes = _deprecatedReactNativePropTypes.ViewPropTypes || View.propTypes;
|
|
22
22
|
const propTypes = { ...viewPropTypes,
|
|
23
23
|
|
|
24
|
-
/**
|
|
25
|
-
* An array of coordinates to describe the polygon
|
|
24
|
+
/**
|
|
25
|
+
* An array of coordinates to describe the polygon
|
|
26
26
|
*/
|
|
27
27
|
coordinates: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
28
|
-
/**
|
|
29
|
-
* Latitude/Longitude coordinates
|
|
28
|
+
/**
|
|
29
|
+
* Latitude/Longitude coordinates
|
|
30
30
|
*/
|
|
31
31
|
latitude: _propTypes.default.number.isRequired,
|
|
32
32
|
longitude: _propTypes.default.number.isRequired
|
|
33
33
|
})),
|
|
34
34
|
|
|
35
|
-
/**
|
|
36
|
-
* An array of array of coordinates to describe the polygon holes
|
|
35
|
+
/**
|
|
36
|
+
* An array of array of coordinates to describe the polygon holes
|
|
37
37
|
*/
|
|
38
38
|
holes: _propTypes.default.arrayOf(_propTypes.default.arrayOf(_propTypes.default.shape({
|
|
39
|
-
/**
|
|
40
|
-
* Latitude/Longitude coordinates
|
|
39
|
+
/**
|
|
40
|
+
* Latitude/Longitude coordinates
|
|
41
41
|
*/
|
|
42
42
|
latitude: _propTypes.default.number.isRequired,
|
|
43
43
|
longitude: _propTypes.default.number.isRequired
|
|
44
44
|
}))),
|
|
45
45
|
|
|
46
|
-
/**
|
|
47
|
-
* The color to use for the polygon.
|
|
46
|
+
/**
|
|
47
|
+
* The color to use for the polygon.
|
|
48
48
|
*/
|
|
49
49
|
fillColor: _deprecatedReactNativePropTypes.ColorPropType,
|
|
50
50
|
|
|
51
|
-
/**
|
|
52
|
-
* The color to use for the polygon stroke.
|
|
51
|
+
/**
|
|
52
|
+
* The color to use for the polygon stroke.
|
|
53
53
|
*/
|
|
54
54
|
strokeColor: _deprecatedReactNativePropTypes.ColorPropType,
|
|
55
55
|
|
|
56
|
-
/**
|
|
57
|
-
* The stroke width to use for the polygon.
|
|
56
|
+
/**
|
|
57
|
+
* The stroke width to use for the polygon.
|
|
58
58
|
*/
|
|
59
59
|
strokeWidth: _propTypes.default.number,
|
|
60
60
|
|
|
61
|
-
/**
|
|
62
|
-
* zIndex
|
|
61
|
+
/**
|
|
62
|
+
* zIndex
|
|
63
63
|
*/
|
|
64
64
|
zIndex: _propTypes.default.number,
|
|
65
65
|
|
|
66
|
-
/**
|
|
67
|
-
* visible
|
|
66
|
+
/**
|
|
67
|
+
* visible
|
|
68
68
|
*/
|
|
69
69
|
visible: _propTypes.default.bool,
|
|
70
70
|
|
|
71
|
-
/**
|
|
72
|
-
* userData
|
|
71
|
+
/**
|
|
72
|
+
* userData
|
|
73
73
|
*/
|
|
74
74
|
userData: _propTypes.default.object,
|
|
75
75
|
|
|
76
|
-
/**
|
|
77
|
-
* Callback that is called when the user presses on the polygon
|
|
76
|
+
/**
|
|
77
|
+
* Callback that is called when the user presses on the polygon
|
|
78
78
|
*/
|
|
79
79
|
onPress: _propTypes.default.func
|
|
80
80
|
};
|
|
@@ -137,9 +137,21 @@ class MFPolygon extends _react.default.Component {
|
|
|
137
137
|
_runCommand(name, args) {
|
|
138
138
|
switch (_reactNative.Platform.OS) {
|
|
139
139
|
case 'android':
|
|
140
|
-
|
|
140
|
+
{
|
|
141
|
+
if (!_reactNative.UIManager || typeof _reactNative.UIManager.dispatchViewManagerCommand !== 'function') {
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
141
144
|
|
|
142
|
-
|
|
145
|
+
const commandId = this._uiManagerCommand(name);
|
|
146
|
+
|
|
147
|
+
if (commandId == null) {
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
_reactNative.UIManager.dispatchViewManagerCommand(this._getHandle(), commandId, args);
|
|
152
|
+
|
|
153
|
+
break;
|
|
154
|
+
}
|
|
143
155
|
|
|
144
156
|
case 'ios':
|
|
145
157
|
this._mapManagerCommand(name)(this._getHandle(), ...args);
|
|
@@ -152,16 +164,22 @@ class MFPolygon extends _react.default.Component {
|
|
|
152
164
|
}
|
|
153
165
|
|
|
154
166
|
_uiManagerCommand(name) {
|
|
155
|
-
const
|
|
167
|
+
const uiManager = _reactNative.UIManager || _reactNative.NativeModules.UIManager;
|
|
156
168
|
const componentName = "RMFPolygon";
|
|
157
169
|
|
|
158
|
-
if (!
|
|
170
|
+
if (!uiManager) {
|
|
171
|
+
return null;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
if (!uiManager.getViewManagerConfig) {
|
|
159
175
|
// RN < 0.58
|
|
160
|
-
|
|
176
|
+
const legacyConfig = uiManager[componentName];
|
|
177
|
+
return legacyConfig && legacyConfig.Commands ? legacyConfig.Commands[name] : null;
|
|
161
178
|
} // RN >= 0.58
|
|
162
179
|
|
|
163
180
|
|
|
164
|
-
|
|
181
|
+
const config = uiManager.getViewManagerConfig(componentName);
|
|
182
|
+
return config && config.Commands ? config.Commands[name] : null;
|
|
165
183
|
}
|
|
166
184
|
|
|
167
185
|
_mapManagerCommand(name) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["viewPropTypes","ViewPropTypes","View","propTypes","coordinates","PropTypes","arrayOf","shape","latitude","number","isRequired","longitude","holes","fillColor","ColorPropType","strokeColor","strokeWidth","zIndex","visible","bool","userData","object","onPress","func","MFPolygon","React","Component","constructor","props","_onPress","bind","_ref","event","stopPropagation","ref","polygon","setCoordinates","_runCommand","setHoles","setFillColor","color","processColor","setStrokeColor","setStrokeWidth","width","setVisible","setZIndex","setUserData","_getHandle","findNodeHandle","name","args","Platform","OS","
|
|
1
|
+
{"version":3,"names":["viewPropTypes","ViewPropTypes","View","propTypes","coordinates","PropTypes","arrayOf","shape","latitude","number","isRequired","longitude","holes","fillColor","ColorPropType","strokeColor","strokeWidth","zIndex","visible","bool","userData","object","onPress","func","MFPolygon","React","Component","constructor","props","_onPress","bind","_ref","event","stopPropagation","ref","polygon","setCoordinates","_runCommand","setHoles","setFillColor","color","processColor","setStrokeColor","setStrokeWidth","width","setVisible","setZIndex","setUserData","_getHandle","findNodeHandle","name","args","Platform","OS","UIManager","dispatchViewManagerCommand","commandId","_uiManagerCommand","_mapManagerCommand","uiManager","NativeModules","componentName","getViewManagerConfig","legacyConfig","Commands","config","render","RMFPolygon","requireNativeComponent"],"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;;AACA;;AACA;;AACA;;;;;;AASA;AACA,MAAMA,aAAa,GAAGC,6CAAA,IAAiBC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AEL,GAAG,EAAE,KAAKG,IAFL;MAGL,OAAO,EAAE,KAAKF;IAHT,GAAP;EAKD;;AA5GqC;;;AA+GxCL,SAAS,CAACrB,SAAV,GAAsBA,SAAtB;AAEA,IAAIgE,UAAU,GAAG,IAAAC,mCAAA,EAAwB,YAAxB,EAAqC5C,SAArC,CAAjB"}
|
|
@@ -21,49 +21,49 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
21
21
|
const viewPropTypes = _deprecatedReactNativePropTypes.ViewPropTypes || View.propTypes;
|
|
22
22
|
const propTypes = { ...viewPropTypes,
|
|
23
23
|
|
|
24
|
-
/**
|
|
25
|
-
* An array of coordinates to describe the polyline
|
|
24
|
+
/**
|
|
25
|
+
* An array of coordinates to describe the polyline
|
|
26
26
|
*/
|
|
27
27
|
coordinates: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
28
|
-
/**
|
|
29
|
-
* Latitude/Longitude coordinates
|
|
28
|
+
/**
|
|
29
|
+
* Latitude/Longitude coordinates
|
|
30
30
|
*/
|
|
31
31
|
latitude: _propTypes.default.number.isRequired,
|
|
32
32
|
longitude: _propTypes.default.number.isRequired
|
|
33
33
|
})),
|
|
34
34
|
|
|
35
|
-
/**
|
|
36
|
-
* The color to use for the path.
|
|
35
|
+
/**
|
|
36
|
+
* The color to use for the path.
|
|
37
37
|
*/
|
|
38
38
|
color: _deprecatedReactNativePropTypes.ColorPropType,
|
|
39
39
|
|
|
40
|
-
/**
|
|
41
|
-
* The stroke width to use for the path.
|
|
40
|
+
/**
|
|
41
|
+
* The stroke width to use for the path.
|
|
42
42
|
*/
|
|
43
43
|
width: _propTypes.default.number,
|
|
44
44
|
|
|
45
|
-
/**
|
|
46
|
-
* The default style is `solid`.
|
|
45
|
+
/**
|
|
46
|
+
* The default style is `solid`.
|
|
47
47
|
*/
|
|
48
48
|
lineStyle: _propTypes.default.oneOf(['solid', 'dotted']),
|
|
49
49
|
|
|
50
|
-
/**
|
|
51
|
-
* zIndex
|
|
50
|
+
/**
|
|
51
|
+
* zIndex
|
|
52
52
|
*/
|
|
53
53
|
zIndex: _propTypes.default.number,
|
|
54
54
|
|
|
55
|
-
/**
|
|
56
|
-
* visible
|
|
55
|
+
/**
|
|
56
|
+
* visible
|
|
57
57
|
*/
|
|
58
58
|
visible: _propTypes.default.bool,
|
|
59
59
|
|
|
60
|
-
/**
|
|
61
|
-
* userData
|
|
60
|
+
/**
|
|
61
|
+
* userData
|
|
62
62
|
*/
|
|
63
63
|
userData: _propTypes.default.object,
|
|
64
64
|
|
|
65
|
-
/**
|
|
66
|
-
* Callback that is called when the user presses on the polyline
|
|
65
|
+
/**
|
|
66
|
+
* Callback that is called when the user presses on the polyline
|
|
67
67
|
*/
|
|
68
68
|
onPress: _propTypes.default.func
|
|
69
69
|
};
|
|
@@ -127,9 +127,21 @@ class MFPolyline extends _react.default.Component {
|
|
|
127
127
|
_runCommand(name, args) {
|
|
128
128
|
switch (_reactNative.Platform.OS) {
|
|
129
129
|
case 'android':
|
|
130
|
-
|
|
130
|
+
{
|
|
131
|
+
if (!_reactNative.UIManager || typeof _reactNative.UIManager.dispatchViewManagerCommand !== 'function') {
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
131
134
|
|
|
132
|
-
|
|
135
|
+
const commandId = this._uiManagerCommand(name);
|
|
136
|
+
|
|
137
|
+
if (commandId == null) {
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
_reactNative.UIManager.dispatchViewManagerCommand(this._getHandle(), commandId, args);
|
|
142
|
+
|
|
143
|
+
break;
|
|
144
|
+
}
|
|
133
145
|
|
|
134
146
|
case 'ios':
|
|
135
147
|
this._mapManagerCommand(name)(this._getHandle(), ...args);
|
|
@@ -142,16 +154,22 @@ class MFPolyline extends _react.default.Component {
|
|
|
142
154
|
}
|
|
143
155
|
|
|
144
156
|
_uiManagerCommand(name) {
|
|
145
|
-
const
|
|
157
|
+
const uiManager = _reactNative.UIManager || _reactNative.NativeModules.UIManager;
|
|
146
158
|
const componentName = "RMFPolyline";
|
|
147
159
|
|
|
148
|
-
if (!
|
|
160
|
+
if (!uiManager) {
|
|
161
|
+
return null;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
if (!uiManager.getViewManagerConfig) {
|
|
149
165
|
// RN < 0.58
|
|
150
|
-
|
|
166
|
+
const legacyConfig = uiManager[componentName];
|
|
167
|
+
return legacyConfig && legacyConfig.Commands ? legacyConfig.Commands[name] : null;
|
|
151
168
|
} // RN >= 0.58
|
|
152
169
|
|
|
153
170
|
|
|
154
|
-
|
|
171
|
+
const config = uiManager.getViewManagerConfig(componentName);
|
|
172
|
+
return config && config.Commands ? config.Commands[name] : null;
|
|
155
173
|
}
|
|
156
174
|
|
|
157
175
|
_mapManagerCommand(name) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["viewPropTypes","ViewPropTypes","View","propTypes","coordinates","PropTypes","arrayOf","shape","latitude","number","isRequired","longitude","color","ColorPropType","width","lineStyle","oneOf","zIndex","visible","bool","userData","object","onPress","func","MFPolyline","React","Component","constructor","props","_onPress","bind","_ref","event","stopPropagation","ref","polyline","setCoordinates","_runCommand","setWidth","setColor","processColor","setVisible","setTouchable","touchable","setZIndex","setLineStyle","style","setUserData","_getHandle","findNodeHandle","name","args","Platform","OS","
|
|
1
|
+
{"version":3,"names":["viewPropTypes","ViewPropTypes","View","propTypes","coordinates","PropTypes","arrayOf","shape","latitude","number","isRequired","longitude","color","ColorPropType","width","lineStyle","oneOf","zIndex","visible","bool","userData","object","onPress","func","MFPolyline","React","Component","constructor","props","_onPress","bind","_ref","event","stopPropagation","ref","polyline","setCoordinates","_runCommand","setWidth","setColor","processColor","setVisible","setTouchable","touchable","setZIndex","setLineStyle","style","setUserData","_getHandle","findNodeHandle","name","args","Platform","OS","UIManager","dispatchViewManagerCommand","commandId","_uiManagerCommand","_mapManagerCommand","uiManager","NativeModules","componentName","getViewManagerConfig","legacyConfig","Commands","config","render","RMFPolyline","requireNativeComponent"],"sources":["MFPolyline.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 polyline\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 * The color to use for the path.\r\n */\r\n color: ColorPropType,\r\n\r\n /**\r\n * The stroke width to use for the path.\r\n */\r\n width: PropTypes.number,\r\n\r\n /**\r\n * The default style is `solid`.\r\n */\r\n lineStyle: PropTypes.oneOf(['solid', 'dotted']),\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 polyline\r\n */\r\n onPress: PropTypes.func,\r\n};\r\n\r\n\r\nclass MFPolyline 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.polyline = ref;\r\n }\r\n\r\n // TODO - bug\r\n setCoordinates(coordinates) {\r\n this._runCommand(\"setCoordinates\", [coordinates])\r\n }\r\n\r\n setWidth(width) {\r\n this._runCommand(\"setWidth\", [width])\r\n }\r\n\r\n setColor(color) {\r\n this._runCommand(\"setColor\", [processColor(color)])\r\n }\r\n\r\n setVisible(visible) {\r\n this._runCommand(\"setVisible\", [visible])\r\n }\r\n\r\n setTouchable(touchable) {\r\n this._runCommand(\"setTouchable\", [touchable])\r\n }\r\n\r\n setZIndex(zIndex) {\r\n this._runCommand(\"setZIndex\", [zIndex])\r\n }\r\n\r\n setLineStyle(style) {\r\n this._runCommand(\"setLineStyle\", [style])\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.polyline);\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 = \"RMFPolyline\";\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[`RMFPolyline`][name];\r\n }\r\n\r\n render() {\r\n return <RMFPolyline\r\n {...this.props}\r\n ref={this._ref}\r\n onPress={this._onPress}\r\n />;\r\n }\r\n}\r\n\r\nMFPolyline.propTypes = propTypes;\r\n\r\nvar RMFPolyline = requireNativeComponent(`RMFPolyline`, MFPolyline);\r\n\r\nexport { MFPolyline }\r\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;AASA;AACA,MAAMA,aAAa,GAAGC,6CAAA,IAAiBC,IAAI,CAACC,SAA5C;AAEA,MAAMA,SAAS,GAAG,EAChB,GAAGH,aADa;;EAGhB;AACF;AACA;EACEI,WAAW,EAAEC,kBAAA,CAAUC,OAAV,CACXD,kBAAA,CAAUE,KAAV,CAAgB;IACd;AACN;AACA;IACMC,QAAQ,EAAEH,kBAAA,CAAUI,MAAV,CAAiBC,UAJb;IAKdC,SAAS,EAAEN,kBAAA,CAAUI,MAAV,CAAiBC;EALd,CAAhB,CADW,CANG;;EAgBhB;AACF;AACA;EACEE,KAAK,EAAEC,6CAnBS;;EAqBhB;AACF;AACA;EACEC,KAAK,EAAET,kBAAA,CAAUI,MAxBD;;EA0BhB;AACF;AACA;EACEM,SAAS,EAAEV,kBAAA,CAAUW,KAAV,CAAgB,CAAC,OAAD,EAAU,QAAV,CAAhB,CA7BK;;EA+BhB;AACF;AACA;EACEC,MAAM,EAAEZ,kBAAA,CAAUI,MAlCF;;EAoChB;AACF;AACA;EACES,OAAO,EAAEb,kBAAA,CAAUc,IAvCH;;EAyChB;AACF;AACA;EACEC,QAAQ,EAACf,kBAAA,CAAUgB,MA5CH;;EA8ChB;AACF;AACA;EACEC,OAAO,EAAEjB,kBAAA,CAAUkB;AAjDH,CAAlB;;AAqDA,MAAMC,UAAN,SAAyBC,cAAA,CAAMC,SAA/B,CAAyC;EACvCC,WAAW,CAACC,KAAD,EAAQ;IACjB,MAAMA,KAAN;IACA,KAAKC,QAAL,GAAgB,KAAKA,QAAL,CAAcC,IAAd,CAAmB,IAAnB,CAAhB;IACA,KAAKC,IAAL,GAAY,KAAKA,IAAL,CAAUD,IAAV,CAAe,IAAf,CAAZ;EACD;;EAEDD,QAAQ,CAACG,KAAD,EA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L;MAGL,OAAO,EAAE,KAAKF;IAHT,GAAP;EAKD;;AA7GsC;;;AAgHzCL,UAAU,CAACrB,SAAX,GAAuBA,SAAvB;AAEA,IAAIgE,WAAW,GAAG,IAAAC,mCAAA,EAAwB,aAAxB,EAAsC5C,UAAtC,CAAlB"}
|
|
@@ -19,21 +19,21 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
19
19
|
const viewPropTypes = _deprecatedReactNativePropTypes.ViewPropTypes || _reactNative.View.propTypes;
|
|
20
20
|
const propTypes = { ...viewPropTypes,
|
|
21
21
|
|
|
22
|
-
/**
|
|
23
|
-
* The url template of the tile server. The patterns {x} {y} {z} will be replaced at runtime
|
|
24
|
-
* For example, https://tile.openstreetmap.de/{z}/{x}/{y}.png
|
|
22
|
+
/**
|
|
23
|
+
* The url template of the tile server. The patterns {x} {y} {z} will be replaced at runtime
|
|
24
|
+
* For example, https://tile.openstreetmap.de/{z}/{x}/{y}.png
|
|
25
25
|
*/
|
|
26
26
|
urlTemplate: _propTypes.default.string.isRequired,
|
|
27
27
|
|
|
28
|
-
/**
|
|
29
|
-
* visible
|
|
28
|
+
/**
|
|
29
|
+
* visible
|
|
30
30
|
*/
|
|
31
31
|
visible: _propTypes.default.bool,
|
|
32
32
|
|
|
33
|
-
/**
|
|
34
|
-
* The order in which this tile overlay is drawn with respect to other overlays. An overlay
|
|
35
|
-
* with a larger z-index is drawn over overlays with smaller z-indices. The order of overlays
|
|
36
|
-
* with the same z-index is arbitrary. The default zIndex is 0.
|
|
33
|
+
/**
|
|
34
|
+
* The order in which this tile overlay is drawn with respect to other overlays. An overlay
|
|
35
|
+
* with a larger z-index is drawn over overlays with smaller z-indices. The order of overlays
|
|
36
|
+
* with the same z-index is arbitrary. The default zIndex is 0.
|
|
37
37
|
*/
|
|
38
38
|
zIndex: _propTypes.default.number
|
|
39
39
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["viewPropTypes","ViewPropTypes","View","propTypes","urlTemplate","PropTypes","string","isRequired","visible","bool","zIndex","number","MFTileOverlay","React","Component","render","props","RMFTileOverlay","requireNativeComponent"],"sources":["MFTileOverlay.js"],"sourcesContent":["import PropTypes from \"prop-types\";\nimport React from 'react';\nimport {ViewPropTypes} from 'deprecated-react-native-prop-types';\nimport {\n requireNativeComponent,\n View,\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;\nconst propTypes = {\n ...viewPropTypes,\n\n /**\n * The url template of the tile server. The patterns {x} {y} {z} will be replaced at runtime\n * For example, https://tile.openstreetmap.de/{z}/{x}/{y}.png\n */\n urlTemplate: PropTypes.string.isRequired,\n\n /**\n * visible\n */\n visible: PropTypes.bool,\n\n /**\n * The order in which this tile overlay is drawn with respect to other overlays. An overlay\n * with a larger z-index is drawn over overlays with smaller z-indices. The order of overlays\n * with the same z-index is arbitrary. The default zIndex is 0.\n */\n zIndex: PropTypes.number,\n};\n\nclass MFTileOverlay extends React.Component {\n render() {\n return <RMFTileOverlay\n {...this.props}\n />;\n }\n}\n\nMFTileOverlay.propTypes = propTypes;\n\nvar RMFTileOverlay = requireNativeComponent(`RMFTileOverlay`, MFTileOverlay);\n\nexport { MFTileOverlay }\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;;;AAKA;AACA,MAAMA,aAAa,GAAGC,6CAAA,IAAiBC,iBAAA,CAAKC,SAA5C;AACA,MAAMA,SAAS,GAAG,EAChB,GAAGH,aADa;;EAGhB;AACF;AACA;AACA;EACEI,WAAW,EAAEC,kBAAA,CAAUC,MAAV,CAAiBC,UAPd;;EAShB;AACF;AACA;EACEC,OAAO,EAAEH,kBAAA,CAAUI,IAZH;;EAchB;AACF;AACA;AACA;AACA;EACEC,MAAM,EAAEL,kBAAA,CAAUM;AAnBF,CAAlB;;AAsBA,MAAMC,aAAN,SAA4BC,cAAA,CAAMC,SAAlC,CAA4C;EAC1CC,MAAM,GAAG;IACP,oBAAO,6BAAC,cAAD,EACD,KAAKC,KADJ,CAAP;EAGD;;AALyC;;;AAQ5CJ,aAAa,CAACT,SAAd,GAA0BA,SAA1B;AAEA,IAAIc,cAAc,GAAG,IAAAC,mCAAA,EAAwB,gBAAxB,EAAyCN,aAAzC,CAArB"}
|
|
1
|
+
{"version":3,"names":["viewPropTypes","ViewPropTypes","View","propTypes","urlTemplate","PropTypes","string","isRequired","visible","bool","zIndex","number","MFTileOverlay","React","Component","render","props","RMFTileOverlay","requireNativeComponent"],"sources":["MFTileOverlay.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 View,\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\nconst propTypes = {\r\n ...viewPropTypes,\r\n\r\n /**\r\n * The url template of the tile server. The patterns {x} {y} {z} will be replaced at runtime\r\n * For example, https://tile.openstreetmap.de/{z}/{x}/{y}.png\r\n */\r\n urlTemplate: PropTypes.string.isRequired,\r\n\r\n /**\r\n * visible\r\n */\r\n visible: PropTypes.bool,\r\n\r\n /**\r\n * The order in which this tile overlay is drawn with respect to other overlays. An overlay\r\n * with a larger z-index is drawn over overlays with smaller z-indices. The order of overlays\r\n * with the same z-index is arbitrary. The default zIndex is 0.\r\n */\r\n zIndex: PropTypes.number,\r\n};\r\n\r\nclass MFTileOverlay extends React.Component {\r\n render() {\r\n return <RMFTileOverlay\r\n {...this.props}\r\n />;\r\n }\r\n}\r\n\r\nMFTileOverlay.propTypes = propTypes;\r\n\r\nvar RMFTileOverlay = requireNativeComponent(`RMFTileOverlay`, MFTileOverlay);\r\n\r\nexport { MFTileOverlay }\r\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;;;AAKA;AACA,MAAMA,aAAa,GAAGC,6CAAA,IAAiBC,iBAAA,CAAKC,SAA5C;AACA,MAAMA,SAAS,GAAG,EAChB,GAAGH,aADa;;EAGhB;AACF;AACA;AACA;EACEI,WAAW,EAAEC,kBAAA,CAAUC,MAAV,CAAiBC,UAPd;;EAShB;AACF;AACA;EACEC,OAAO,EAAEH,kBAAA,CAAUI,IAZH;;EAchB;AACF;AACA;AACA;AACA;EACEC,MAAM,EAAEL,kBAAA,CAAUM;AAnBF,CAAlB;;AAsBA,MAAMC,aAAN,SAA4BC,cAAA,CAAMC,SAAlC,CAA4C;EAC1CC,MAAM,GAAG;IACP,oBAAO,6BAAC,cAAD,EACD,KAAKC,KADJ,CAAP;EAGD;;AALyC;;;AAQ5CJ,aAAa,CAACT,SAAd,GAA0BA,SAA1B;AAEA,IAAIc,cAAc,GAAG,IAAAC,mCAAA,EAAwB,gBAAxB,EAAyCN,aAAzC,CAArB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["LINKING_ERROR","Platform","select","ios","default","ComponentName","Map4dMapView","UIManager","getViewManagerConfig","requireNativeComponent","Error"],"sources":["Map4dMapView.tsx"],"sourcesContent":["import {\n requireNativeComponent,\n UIManager,\n Platform,\n ViewStyle,\n } from 'react-native';\n \n const LINKING_ERROR =\n `The package 'react-native-map4d-map' doesn't seem to be linked. Make sure: \\n\\n` +\n Platform.select({ ios: \"- You have run 'pod install'\\n\", default: '' }) +\n '- You rebuilt the app after installing the package\\n' +\n '- You are not using Expo managed workflow\\n';\n \n type Map4dMapProps = {\n color: string;\n style: ViewStyle;\n };\n \n const ComponentName = 'Map4dMapView';\n \n export const Map4dMapView =\n UIManager.getViewManagerConfig(ComponentName) != null\n ? requireNativeComponent<Map4dMapProps>(ComponentName)\n : () => {\n throw new Error(LINKING_ERROR);\n };\n "],"mappings":";;;;;;;AAAA;;AAOE,MAAMA,aAAa,GAChB,iFAAD,GACAC,qBAAA,CAASC,MAAT,CAAgB;EAAEC,GAAG,EAAE,gCAAP;EAAyCC,OAAO,EAAE;AAAlD,CAAhB,CADA,GAEA,sDAFA,GAGA,6CAJF;AAWA,MAAMC,aAAa,GAAG,cAAtB;AAEO,MAAMC,YAAY,GACvBC,sBAAA,CAAUC,oBAAV,CAA+BH,aAA/B,KAAiD,IAAjD,GACI,IAAAI,mCAAA,EAAsCJ,aAAtC,CADJ,GAEI,MAAM;EACJ,MAAM,IAAIK,KAAJ,CAAUV,aAAV,CAAN;AACD,CALA"}
|
|
1
|
+
{"version":3,"names":["LINKING_ERROR","Platform","select","ios","default","ComponentName","Map4dMapView","UIManager","getViewManagerConfig","requireNativeComponent","Error"],"sources":["Map4dMapView.tsx"],"sourcesContent":["import {\r\n requireNativeComponent,\r\n UIManager,\r\n Platform,\r\n ViewStyle,\r\n } from 'react-native';\r\n \r\n const LINKING_ERROR =\r\n `The package 'react-native-map4d-map' doesn't seem to be linked. Make sure: \\n\\n` +\r\n Platform.select({ ios: \"- You have run 'pod install'\\n\", default: '' }) +\r\n '- You rebuilt the app after installing the package\\n' +\r\n '- You are not using Expo managed workflow\\n';\r\n \r\n type Map4dMapProps = {\r\n color: string;\r\n style: ViewStyle;\r\n };\r\n \r\n const ComponentName = 'Map4dMapView';\r\n \r\n export const Map4dMapView =\r\n UIManager.getViewManagerConfig(ComponentName) != null\r\n ? requireNativeComponent<Map4dMapProps>(ComponentName)\r\n : () => {\r\n throw new Error(LINKING_ERROR);\r\n };\r\n "],"mappings":";;;;;;;AAAA;;AAOE,MAAMA,aAAa,GAChB,iFAAD,GACAC,qBAAA,CAASC,MAAT,CAAgB;EAAEC,GAAG,EAAE,gCAAP;EAAyCC,OAAO,EAAE;AAAlD,CAAhB,CADA,GAEA,sDAFA,GAGA,6CAJF;AAWA,MAAMC,aAAa,GAAG,cAAtB;AAEO,MAAMC,YAAY,GACvBC,sBAAA,CAAUC,oBAAV,CAA+BH,aAA/B,KAAiD,IAAjD,GACI,IAAAI,mCAAA,EAAsCJ,aAAtC,CADJ,GAEI,MAAM;EACJ,MAAM,IAAIK,KAAJ,CAAUV,aAAV,CAAN;AACD,CALA"}
|