react-native-map4d-map-dtqg 0.1.0
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 -0
- package/README.md +41 -0
- package/android/build.gradle +60 -0
- package/android/src/main/AndroidManifest.xml +4 -0
- package/android/src/main/java/com/reactnativemap4dmap/ImageUtils.java +87 -0
- package/android/src/main/java/com/reactnativemap4dmap/Map4dMapModule.java +298 -0
- package/android/src/main/java/com/reactnativemap4dmap/Map4dMapPackage.java +35 -0
- package/android/src/main/java/com/reactnativemap4dmap/Map4dMapViewManager.java +31 -0
- package/android/src/main/java/com/reactnativemap4dmap/RMFBuilding.java +167 -0
- package/android/src/main/java/com/reactnativemap4dmap/RMFBuildingManager.java +121 -0
- package/android/src/main/java/com/reactnativemap4dmap/RMFCircle.java +105 -0
- package/android/src/main/java/com/reactnativemap4dmap/RMFCircleManager.java +122 -0
- package/android/src/main/java/com/reactnativemap4dmap/RMFDirectionsRenderer.java +502 -0
- package/android/src/main/java/com/reactnativemap4dmap/RMFDirectionsRendererManager.java +143 -0
- package/android/src/main/java/com/reactnativemap4dmap/RMFFeature.java +18 -0
- package/android/src/main/java/com/reactnativemap4dmap/RMFMapView.java +1172 -0
- package/android/src/main/java/com/reactnativemap4dmap/RMFMapViewManager.java +226 -0
- package/android/src/main/java/com/reactnativemap4dmap/RMFMarker.java +412 -0
- package/android/src/main/java/com/reactnativemap4dmap/RMFMarkerManager.java +212 -0
- package/android/src/main/java/com/reactnativemap4dmap/RMFPOI.java +222 -0
- package/android/src/main/java/com/reactnativemap4dmap/RMFPOIManager.java +119 -0
- package/android/src/main/java/com/reactnativemap4dmap/RMFPolygon.java +173 -0
- package/android/src/main/java/com/reactnativemap4dmap/RMFPolygonManager.java +148 -0
- package/android/src/main/java/com/reactnativemap4dmap/RMFPolyline.java +146 -0
- package/android/src/main/java/com/reactnativemap4dmap/RMFPolylineManager.java +138 -0
- package/android/src/main/java/com/reactnativemap4dmap/RMFTileOverlay.java +95 -0
- package/android/src/main/java/com/reactnativemap4dmap/RMFTileOverlayManager.java +65 -0
- package/android/src/main/java/com/reactnativemap4dmap/SizeReportingShadowNode.java +31 -0
- package/android/src/main/java/com/reactnativemap4dmap/ViewAttacherGroup.java +31 -0
- package/android/src/main/java/com/reactnativemap4dmap/ViewChangesTracker.java +70 -0
- package/android/src/main/java/vn/map4d/map/annotations/RMFBitmapDescriptor.java +9 -0
- package/ios/Map4dMap.h +7 -0
- package/ios/Map4dMap.m +14 -0
- package/ios/Map4dMap.xcodeproj/project.pbxproj +282 -0
- package/ios/Map4dMapViewManager.m +34 -0
- package/ios/RCTConvert+Map4dMap.h +33 -0
- package/ios/RCTConvert+Map4dMap.m +112 -0
- package/ios/RMFCircle.h +37 -0
- package/ios/RMFCircle.m +100 -0
- package/ios/RMFCircleManager.h +18 -0
- package/ios/RMFCircleManager.m +155 -0
- package/ios/RMFCircleMap4d.h +23 -0
- package/ios/RMFCircleMap4d.m +13 -0
- package/ios/RMFCoordinate.h +22 -0
- package/ios/RMFCoordinate.m +13 -0
- package/ios/RMFDirectionsMarkerOptions.h +24 -0
- package/ios/RMFDirectionsMarkerOptions.m +23 -0
- package/ios/RMFDirectionsRenderer.h +47 -0
- package/ios/RMFDirectionsRenderer.m +182 -0
- package/ios/RMFDirectionsRendererManager.h +17 -0
- package/ios/RMFDirectionsRendererManager.m +84 -0
- package/ios/RMFDirectionsRendererMap4d.h +21 -0
- package/ios/RMFDirectionsRendererMap4d.m +12 -0
- package/ios/RMFDummyView.h +7 -0
- package/ios/RMFDummyView.m +13 -0
- package/ios/RMFEventResponse.h +39 -0
- package/ios/RMFEventResponse.m +98 -0
- package/ios/RMFIcon.h +24 -0
- package/ios/RMFIcon.m +35 -0
- package/ios/RMFMapView.h +84 -0
- package/ios/RMFMapView.m +376 -0
- package/ios/RMFMapViewManager.h +17 -0
- package/ios/RMFMapViewManager.m +493 -0
- package/ios/RMFMarker.h +57 -0
- package/ios/RMFMarker.m +267 -0
- package/ios/RMFMarkerManager.h +17 -0
- package/ios/RMFMarkerManager.m +156 -0
- package/ios/RMFMarkerMap4d.h +19 -0
- package/ios/RMFMarkerMap4d.m +13 -0
- package/ios/RMFPOI.h +38 -0
- package/ios/RMFPOI.m +123 -0
- package/ios/RMFPOIManager.h +18 -0
- package/ios/RMFPOIManager.m +168 -0
- package/ios/RMFPOIMap4d.h +22 -0
- package/ios/RMFPOIMap4d.m +12 -0
- package/ios/RMFPolygon.h +41 -0
- package/ios/RMFPolygon.m +106 -0
- package/ios/RMFPolygonManager.h +18 -0
- package/ios/RMFPolygonManager.m +141 -0
- package/ios/RMFPolygonMap4d.h +23 -0
- package/ios/RMFPolygonMap4d.m +15 -0
- package/ios/RMFPolyline.h +38 -0
- package/ios/RMFPolyline.m +101 -0
- package/ios/RMFPolylineManager.h +18 -0
- package/ios/RMFPolylineManager.m +139 -0
- package/ios/RMFPolylineMap4d.h +22 -0
- package/ios/RMFPolylineMap4d.m +15 -0
- package/ios/building/RMFBuilding.h +41 -0
- package/ios/building/RMFBuilding.m +104 -0
- package/ios/building/RMFBuildingManager.h +19 -0
- package/ios/building/RMFBuildingManager.m +133 -0
- package/ios/building/RMFBuildingMap4d.h +23 -0
- package/ios/building/RMFBuildingMap4d.m +15 -0
- package/ios/overlays/RMFTileOverlay.h +36 -0
- package/ios/overlays/RMFTileOverlay.m +64 -0
- package/ios/overlays/RMFTileOverlayManager.h +17 -0
- package/ios/overlays/RMFTileOverlayManager.m +27 -0
- package/lib/commonjs/components/MFBuilding.js +192 -0
- package/lib/commonjs/components/MFBuilding.js.map +1 -0
- package/lib/commonjs/components/MFCircle.js +181 -0
- package/lib/commonjs/components/MFCircle.js.map +1 -0
- package/lib/commonjs/components/MFDirectionsRenderer.js +240 -0
- package/lib/commonjs/components/MFDirectionsRenderer.js.map +1 -0
- package/lib/commonjs/components/MFMapView.js +375 -0
- package/lib/commonjs/components/MFMapView.js.map +1 -0
- package/lib/commonjs/components/MFMarker.js +255 -0
- package/lib/commonjs/components/MFMarker.js.map +1 -0
- package/lib/commonjs/components/MFPOI.js +204 -0
- package/lib/commonjs/components/MFPOI.js.map +1 -0
- package/lib/commonjs/components/MFPolygon.js +183 -0
- package/lib/commonjs/components/MFPolygon.js.map +1 -0
- package/lib/commonjs/components/MFPolyline.js +173 -0
- package/lib/commonjs/components/MFPolyline.js.map +1 -0
- package/lib/commonjs/components/MFTileOverlay.js +51 -0
- package/lib/commonjs/components/MFTileOverlay.js.map +1 -0
- package/lib/commonjs/components/Map4dMapView.js +19 -0
- package/lib/commonjs/components/Map4dMapView.js.map +1 -0
- package/lib/commonjs/index.js +78 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/module/components/MFBuilding.js +178 -0
- package/lib/module/components/MFBuilding.js.map +1 -0
- package/lib/module/components/MFCircle.js +167 -0
- package/lib/module/components/MFCircle.js.map +1 -0
- package/lib/module/components/MFDirectionsRenderer.js +226 -0
- package/lib/module/components/MFDirectionsRenderer.js.map +1 -0
- package/lib/module/components/MFMapView.js +361 -0
- package/lib/module/components/MFMapView.js.map +1 -0
- package/lib/module/components/MFMarker.js +240 -0
- package/lib/module/components/MFMarker.js.map +1 -0
- package/lib/module/components/MFPOI.js +190 -0
- package/lib/module/components/MFPOI.js.map +1 -0
- package/lib/module/components/MFPolygon.js +169 -0
- package/lib/module/components/MFPolygon.js.map +1 -0
- package/lib/module/components/MFPolyline.js +159 -0
- package/lib/module/components/MFPolyline.js.map +1 -0
- package/lib/module/components/MFTileOverlay.js +38 -0
- package/lib/module/components/MFTileOverlay.js.map +1 -0
- package/lib/module/components/Map4dMapView.js +10 -0
- package/lib/module/components/Map4dMapView.js.map +1 -0
- package/lib/module/index.js +11 -0
- package/lib/module/index.js.map +1 -0
- package/lib/typescript/components/Map4dMapView.d.ts +7 -0
- package/package.json +152 -0
- package/react-native-map4d-map.podspec +20 -0
- package/src/components/MFBuilding.js +188 -0
- package/src/components/MFCircle.js +173 -0
- package/src/components/MFDirectionsRenderer.js +237 -0
- package/src/components/MFMapView.js +374 -0
- package/src/components/MFMarker.js +246 -0
- package/src/components/MFPOI.js +184 -0
- package/src/components/MFPolygon.js +186 -0
- package/src/components/MFPolyline.js +172 -0
- package/src/components/MFTileOverlay.js +45 -0
- package/src/components/Map4dMapView.tsx +27 -0
- package/src/index.js +21 -0
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.MFBuilding = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
|
|
12
|
+
var _deprecatedReactNativePropTypes = require("deprecated-react-native-prop-types");
|
|
13
|
+
|
|
14
|
+
var _reactNative = require("react-native");
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
19
|
+
|
|
20
|
+
// if ViewPropTypes is not defined fall back to View.propType (to support RN < 0.44)
|
|
21
|
+
const viewPropTypes = _deprecatedReactNativePropTypes.ViewPropTypes || View.propTypes;
|
|
22
|
+
const propTypes = { ...viewPropTypes,
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* The name of the building.
|
|
26
|
+
*/
|
|
27
|
+
name: _propTypes.default.string,
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* The position of the building
|
|
31
|
+
*/
|
|
32
|
+
coordinate: _propTypes.default.shape({
|
|
33
|
+
/**
|
|
34
|
+
* Position for the building.
|
|
35
|
+
*/
|
|
36
|
+
latitude: _propTypes.default.number.isRequired,
|
|
37
|
+
longitude: _propTypes.default.number.isRequired
|
|
38
|
+
}),
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* The model URL for the building.
|
|
42
|
+
*/
|
|
43
|
+
modelUrl: _propTypes.default.string,
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* The texture URL for the building.
|
|
47
|
+
*/
|
|
48
|
+
textureUrl: _propTypes.default.string,
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* The scale of the building.
|
|
52
|
+
*/
|
|
53
|
+
scale: _propTypes.default.number,
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* The bearing of the building.
|
|
57
|
+
*/
|
|
58
|
+
bearing: _propTypes.default.number,
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* The elevation of the building.
|
|
62
|
+
*/
|
|
63
|
+
elevation: _propTypes.default.number,
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Is the building selectable by the user ?
|
|
67
|
+
*/
|
|
68
|
+
selected: _propTypes.default.bool,
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* touchable
|
|
72
|
+
*/
|
|
73
|
+
touchable: _propTypes.default.bool,
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* visible
|
|
77
|
+
*/
|
|
78
|
+
visible: _propTypes.default.bool,
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* userData
|
|
82
|
+
*/
|
|
83
|
+
userData: _propTypes.default.object,
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Callback that is called when the user presses on the building
|
|
87
|
+
*/
|
|
88
|
+
onPress: _propTypes.default.func
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
class MFBuilding extends _react.default.Component {
|
|
92
|
+
constructor(props) {
|
|
93
|
+
super(props);
|
|
94
|
+
this._onPress = this._onPress.bind(this);
|
|
95
|
+
this._ref = this._ref.bind(this);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
_onPress(event) {
|
|
99
|
+
event.stopPropagation();
|
|
100
|
+
|
|
101
|
+
if (this.props.onPress) {
|
|
102
|
+
this.props.onPress(event);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
_ref(ref) {
|
|
107
|
+
this.building = ref;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
setName(name) {
|
|
111
|
+
this._runCommand("setName", [name]);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
setScale(scale) {
|
|
115
|
+
this._runCommand("setScale", [scale]);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
setBearing(bearing) {
|
|
119
|
+
this._runCommand("setBearing", [bearing]);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
setElevation(elevation) {
|
|
123
|
+
this._runCommand("setElevation", [elevation]);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
setSelected(selected) {
|
|
127
|
+
this._runCommand("setSelected", [selected]);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
setTouchable(touchable) {
|
|
131
|
+
this._runCommand("setTouchable", [touchable]);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
setVisible(visible) {
|
|
135
|
+
this._runCommand("setVisible", [visible]);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
setUserData(userData) {
|
|
139
|
+
this._runCommand("setUserData", [userData]);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
_getHandle() {
|
|
143
|
+
return (0, _reactNative.findNodeHandle)(this.building);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
_runCommand(name, args) {
|
|
147
|
+
switch (_reactNative.Platform.OS) {
|
|
148
|
+
case 'android':
|
|
149
|
+
_reactNative.NativeModules.UIManager.dispatchViewManagerCommand(this._getHandle(), this._uiManagerCommand(name), args);
|
|
150
|
+
|
|
151
|
+
break;
|
|
152
|
+
|
|
153
|
+
case 'ios':
|
|
154
|
+
this._mapManagerCommand(name)(this._getHandle(), ...args);
|
|
155
|
+
|
|
156
|
+
break;
|
|
157
|
+
|
|
158
|
+
default:
|
|
159
|
+
break;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
_uiManagerCommand(name) {
|
|
164
|
+
const UIManager = _reactNative.NativeModules.UIManager;
|
|
165
|
+
const componentName = "RMFBuilding";
|
|
166
|
+
|
|
167
|
+
if (!UIManager.getViewManagerConfig) {
|
|
168
|
+
// RN < 0.58
|
|
169
|
+
return UIManager[componentName].Commands[name];
|
|
170
|
+
} // RN >= 0.58
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
return UIManager.getViewManagerConfig(componentName).Commands[name];
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
_mapManagerCommand(name) {
|
|
177
|
+
return _reactNative.NativeModules[`RMFBuilding`][name];
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
render() {
|
|
181
|
+
return /*#__PURE__*/_react.default.createElement(RMFBuilding, _extends({}, this.props, {
|
|
182
|
+
ref: this._ref,
|
|
183
|
+
onPress: this._onPress
|
|
184
|
+
}));
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
exports.MFBuilding = MFBuilding;
|
|
190
|
+
MFBuilding.propTypes = propTypes;
|
|
191
|
+
var RMFBuilding = (0, _reactNative.requireNativeComponent)(`RMFBuilding`, MFBuilding);
|
|
192
|
+
//# sourceMappingURL=MFBuilding.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["viewPropTypes","ViewPropTypes","View","propTypes","name","PropTypes","string","coordinate","shape","latitude","number","isRequired","longitude","modelUrl","textureUrl","scale","bearing","elevation","selected","bool","touchable","visible","userData","object","onPress","func","MFBuilding","React","Component","constructor","props","_onPress","bind","_ref","event","stopPropagation","ref","building","setName","_runCommand","setScale","setBearing","setElevation","setSelected","setTouchable","setVisible","setUserData","_getHandle","findNodeHandle","args","Platform","OS","NativeModules","UIManager","dispatchViewManagerCommand","_uiManagerCommand","_mapManagerCommand","componentName","getViewManagerConfig","Commands","render","RMFBuilding","requireNativeComponent"],"sources":["MFBuilding.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {ViewPropTypes} from 'deprecated-react-native-prop-types';\nimport {\n requireNativeComponent,\n Platform,\n NativeModules,\n findNodeHandle\n} from 'react-native';\n\n// if ViewPropTypes is not defined fall back to View.propType (to support RN < 0.44)\nconst viewPropTypes = ViewPropTypes || View.propTypes;\n\nconst propTypes = {\n ...viewPropTypes,\n\n /**\n * The name of the building.\n */\n name: PropTypes.string,\n\n /**\n * The position of the building\n */\n coordinate: PropTypes.shape({\n /**\n * Position for the building.\n */\n latitude: PropTypes.number.isRequired,\n longitude: PropTypes.number.isRequired,\n }),\n\n /**\n * The model URL for the building.\n */\n modelUrl: PropTypes.string,\n\n /**\n * The texture URL for the building.\n */\n textureUrl: PropTypes.string,\n\n /**\n * The scale of the building.\n */\n scale: PropTypes.number,\n\n /**\n * The bearing of the building.\n */\n bearing: PropTypes.number,\n\n /**\n * The elevation of the building.\n */\n elevation: PropTypes.number,\n\n /**\n * Is the building selectable by the user ?\n */\n selected: PropTypes.bool,\n\n /**\n * touchable\n */\n touchable: PropTypes.bool,\n\n /**\n * visible\n */\n visible: PropTypes.bool,\n\n /**\n * userData\n */\n userData:PropTypes.object,\n\n /**\n * Callback that is called when the user presses on the building\n */\n onPress: PropTypes.func,\n};\n\n\nclass MFBuilding extends React.Component {\n constructor(props) {\n super(props);\n this._onPress = this._onPress.bind(this)\n this._ref = this._ref.bind(this)\n }\n\n _onPress(event) {\n event.stopPropagation();\n if (this.props.onPress) {\n this.props.onPress(event);\n }\n }\n\n _ref(ref) {\n this.building = ref;\n }\n\n setName(name) {\n this._runCommand(\"setName\", [name])\n }\n\n setScale(scale) {\n this._runCommand(\"setScale\", [scale])\n }\n\n setBearing(bearing) {\n this._runCommand(\"setBearing\", [bearing])\n }\n\n setElevation(elevation) {\n this._runCommand(\"setElevation\", [elevation])\n }\n\n setSelected(selected) {\n this._runCommand(\"setSelected\", [selected])\n }\n\n setTouchable(touchable) {\n this._runCommand(\"setTouchable\", [touchable])\n }\n\n setVisible(visible) {\n this._runCommand(\"setVisible\", [visible])\n }\n\n setUserData(userData) {\n this._runCommand(\"setUserData\", [userData])\n }\n\n _getHandle() {\n return findNodeHandle(this.building);\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 _uiManagerCommand(name) {\n const UIManager = NativeModules.UIManager;\n const componentName = \"RMFBuilding\";\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[`RMFBuilding`][name];\n }\n\n render() {\n return <RMFBuilding\n {...this.props}\n ref={this._ref}\n onPress={this._onPress}\n />;\n }\n}\n\nMFBuilding.propTypes = propTypes;\n\nvar RMFBuilding = requireNativeComponent(`RMFBuilding`, MFBuilding);\n\nexport { MFBuilding }"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;AAOA;AACA,MAAMA,aAAa,GAAGC,6CAAA,IAAiBC,IAAI,CAACC,SAA5C;AAEA,MAAMA,SAAS,GAAG,EAChB,GAAGH,aADa;;EAGhB;AACF;AACA;EACEI,IAAI,EAAEC,kBAAA,CAAUC,MANA;;EAQhB;AACF;AACA;EACEC,UAAU,EAAEF,kBAAA,CAAUG,KAAV,CAAgB;IAC1B;AACJ;AACA;IACIC,QAAQ,EAAEJ,kBAAA,CAAUK,MAAV,CAAiBC,UAJD;IAK1BC,SAAS,EAAEP,kBAAA,CAAUK,MAAV,CAAiBC;EALF,CAAhB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AMI,aAAa,GAAG,aAAtB;;IAEA,IAAI,CAACJ,SAAS,CAACK,oBAAf,EAAqC;MACnC;MACA,OAAOL,SAAS,CAACI,aAAD,CAAT,CAAyBE,QAAzB,CAAkCvD,IAAlC,CAAP;IACD,CAPqB,CAStB;;;IACA,OAAOiD,SAAS,CAACK,oBAAV,CAA+BD,aAA/B,EAA8CE,QAA9C,CAAuDvD,IAAvD,CAAP;EACD;;EAEDoD,kBAAkB,CAACpD,IAAD,EAAO;IACvB,OAAOgD,0BAAA,CAAe,aAAf,EAA6BhD,IAA7B,CAAP;EACD;;EAEDwD,MAAM,GAAG;IACP,oBAAO,6BAAC,WAAD,eACD,KAAK9B,KADJ;MAEL,GAAG,EAAE,KAAKG,IAFL;MAGL,OAAO,EAAE,KAAKF;IAHT,GAAP;EAKD;;AAhGsC;;;AAmGzCL,UAAU,CAACvB,SAAX,GAAuBA,SAAvB;AAEA,IAAI0D,WAAW,GAAG,IAAAC,mCAAA,EAAwB,aAAxB,EAAsCpC,UAAtC,CAAlB"}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.MFCircle = void 0;
|
|
7
|
+
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
12
|
+
var _deprecatedReactNativePropTypes = require("deprecated-react-native-prop-types");
|
|
13
|
+
|
|
14
|
+
var _reactNative = require("react-native");
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
19
|
+
|
|
20
|
+
// if ViewPropTypes is not defined fall back to View.propType (to support RN < 0.44)
|
|
21
|
+
const viewPropTypes = _deprecatedReactNativePropTypes.ViewPropTypes || View.propTypes;
|
|
22
|
+
const propTypes = { ...viewPropTypes,
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* The coordinate of the center of the circle
|
|
26
|
+
*/
|
|
27
|
+
center: _propTypes.default.shape({
|
|
28
|
+
/**
|
|
29
|
+
* Coordinates for the center of the circle.
|
|
30
|
+
*/
|
|
31
|
+
latitude: _propTypes.default.number.isRequired,
|
|
32
|
+
longitude: _propTypes.default.number.isRequired
|
|
33
|
+
}).isRequired,
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* The radius of the circle to be drawn (in meters)
|
|
37
|
+
*/
|
|
38
|
+
radius: _propTypes.default.number.isRequired,
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* The stroke width to use for the circle.
|
|
42
|
+
*/
|
|
43
|
+
strokeWidth: _propTypes.default.number,
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* The stroke color to use for the circle.
|
|
47
|
+
*/
|
|
48
|
+
strokeColor: _deprecatedReactNativePropTypes.ColorPropType,
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* The fill color to use for the circle.
|
|
52
|
+
*/
|
|
53
|
+
fillColor: _deprecatedReactNativePropTypes.ColorPropType,
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* zIndex
|
|
57
|
+
*/
|
|
58
|
+
zIndex: _propTypes.default.number,
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* visible
|
|
62
|
+
*/
|
|
63
|
+
visible: _propTypes.default.bool,
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* userData
|
|
67
|
+
*/
|
|
68
|
+
userData: _propTypes.default.object,
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Callback that is called when the user presses on the circle
|
|
72
|
+
*/
|
|
73
|
+
onPress: _propTypes.default.func
|
|
74
|
+
}; // const defaultProps = {
|
|
75
|
+
// strokeColor: '#000',
|
|
76
|
+
// strokeWidth: 1,
|
|
77
|
+
// };
|
|
78
|
+
|
|
79
|
+
class MFCircle extends _react.default.Component {
|
|
80
|
+
constructor(props) {
|
|
81
|
+
super(props);
|
|
82
|
+
this._onPress = this._onPress.bind(this);
|
|
83
|
+
this._ref = this._ref.bind(this);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
setCenter(center) {
|
|
87
|
+
this._runCommand("setCenter", [center]);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
setRadius(radius) {
|
|
91
|
+
this._runCommand("setRadius", [radius]);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
setFillColor(color) {
|
|
95
|
+
this._runCommand("setFillColor", [(0, _reactNative.processColor)(color)]);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
setStrokeColor(color) {
|
|
99
|
+
this._runCommand("setStrokeColor", [(0, _reactNative.processColor)(color)]);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
setStrokeWidth(width) {
|
|
103
|
+
this._runCommand("setStrokeWidth", [width]);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
setUserData(userData) {
|
|
107
|
+
this._runCommand("setUserData", [userData]);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
setZIndex(zIndex) {
|
|
111
|
+
this._runCommand("setZIndex", [zIndex]);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
setVisible(visible) {
|
|
115
|
+
this._runCommand("setVisible", [visible]);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
_getHandle() {
|
|
119
|
+
return (0, _reactNative.findNodeHandle)(this.circle);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
_runCommand(name, args) {
|
|
123
|
+
switch (_reactNative.Platform.OS) {
|
|
124
|
+
case 'android':
|
|
125
|
+
_reactNative.NativeModules.UIManager.dispatchViewManagerCommand(this._getHandle(), this._uiManagerCommand(name), args);
|
|
126
|
+
|
|
127
|
+
break;
|
|
128
|
+
|
|
129
|
+
case 'ios':
|
|
130
|
+
this._mapManagerCommand(name)(this._getHandle(), ...args);
|
|
131
|
+
|
|
132
|
+
break;
|
|
133
|
+
|
|
134
|
+
default:
|
|
135
|
+
break;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
_uiManagerCommand(name) {
|
|
140
|
+
const UIManager = _reactNative.NativeModules.UIManager;
|
|
141
|
+
const componentName = "RMFCircle";
|
|
142
|
+
|
|
143
|
+
if (!UIManager.getViewManagerConfig) {
|
|
144
|
+
// RN < 0.58
|
|
145
|
+
return UIManager[componentName].Commands[name];
|
|
146
|
+
} // RN >= 0.58
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
return UIManager.getViewManagerConfig(componentName).Commands[name];
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
_mapManagerCommand(name) {
|
|
153
|
+
return _reactNative.NativeModules[`RMFCircle`][name];
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
_onPress(event) {
|
|
157
|
+
event.stopPropagation();
|
|
158
|
+
|
|
159
|
+
if (this.props.onPress) {
|
|
160
|
+
this.props.onPress(event);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
_ref(ref) {
|
|
165
|
+
this.circle = ref;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
render() {
|
|
169
|
+
return /*#__PURE__*/_react.default.createElement(RMFCircle, _extends({}, this.props, {
|
|
170
|
+
ref: this._ref,
|
|
171
|
+
onPress: this._onPress
|
|
172
|
+
}));
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
exports.MFCircle = MFCircle;
|
|
178
|
+
MFCircle.propTypes = propTypes; // MFCircle.defaultProps = defaultProps;
|
|
179
|
+
|
|
180
|
+
var RMFCircle = (0, _reactNative.requireNativeComponent)(`RMFCircle`, MFCircle);
|
|
181
|
+
//# sourceMappingURL=MFCircle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["viewPropTypes","ViewPropTypes","View","propTypes","center","PropTypes","shape","latitude","number","isRequired","longitude","radius","strokeWidth","strokeColor","ColorPropType","fillColor","zIndex","visible","bool","userData","object","onPress","func","MFCircle","React","Component","constructor","props","_onPress","bind","_ref","setCenter","_runCommand","setRadius","setFillColor","color","processColor","setStrokeColor","setStrokeWidth","width","setUserData","setZIndex","setVisible","_getHandle","findNodeHandle","circle","name","args","Platform","OS","NativeModules","UIManager","dispatchViewManagerCommand","_uiManagerCommand","_mapManagerCommand","componentName","getViewManagerConfig","Commands","event","stopPropagation","ref","render","RMFCircle","requireNativeComponent"],"sources":["MFCircle.js"],"sourcesContent":["import PropTypes from 'prop-types';\nimport React from 'react';\nimport {ViewPropTypes, ColorPropType} from 'deprecated-react-native-prop-types';\nimport {\n requireNativeComponent,\n Platform,\n NativeModules,\n findNodeHandle,\n processColor\n} from 'react-native';\n\n// if ViewPropTypes is not defined fall back to View.propType (to support RN < 0.44)\nconst viewPropTypes = ViewPropTypes || View.propTypes;\n\nconst propTypes = {\n ...viewPropTypes,\n\n /**\n * The coordinate of the center of the circle\n */\n center: PropTypes.shape({\n /**\n * Coordinates for the center of the circle.\n */\n latitude: PropTypes.number.isRequired,\n longitude: PropTypes.number.isRequired,\n }).isRequired,\n\n /**\n * The radius of the circle to be drawn (in meters)\n */\n radius: PropTypes.number.isRequired,\n\n /**\n * The stroke width to use for the circle.\n */\n strokeWidth: PropTypes.number,\n\n /**\n * The stroke color to use for the circle.\n */\n strokeColor: ColorPropType,\n\n /**\n * The fill color to use for the circle.\n */\n fillColor: ColorPropType,\n\n /**\n * zIndex\n */\n zIndex: PropTypes.number,\n\n /**\n * visible\n */\n visible: PropTypes.bool,\n\n /**\n * userData\n */\n userData:PropTypes.object,\n\n /**\n * Callback that is called when the user presses on the circle\n */\n onPress: PropTypes.func,\n};\n\n// const defaultProps = {\n// strokeColor: '#000',\n// strokeWidth: 1,\n// };\n\nclass MFCircle extends React.Component {\n constructor(props) {\n super(props);\n this._onPress = this._onPress.bind(this)\n this._ref = this._ref.bind(this)\n }\n\n setCenter(center) {\n this._runCommand(\"setCenter\", [center])\n }\n setRadius(radius) {\n this._runCommand(\"setRadius\", [radius])\n }\n setFillColor(color) {\n this._runCommand(\"setFillColor\", [processColor(color)])\n }\n setStrokeColor(color) {\n this._runCommand(\"setStrokeColor\", [processColor(color)])\n }\n setStrokeWidth(width) {\n this._runCommand(\"setStrokeWidth\", [width])\n }\n setUserData(userData) {\n this._runCommand(\"setUserData\", [userData])\n }\n setZIndex(zIndex) {\n this._runCommand(\"setZIndex\", [zIndex])\n }\n setVisible(visible) {\n this._runCommand(\"setVisible\", [visible])\n }\n\n _getHandle() {\n return findNodeHandle(this.circle);\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 _uiManagerCommand(name) {\n const UIManager = NativeModules.UIManager;\n const componentName = \"RMFCircle\";\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[`RMFCircle`][name];\n }\n\n _onPress(event) {\n event.stopPropagation();\n if (this.props.onPress) {\n this.props.onPress(event);\n }\n }\n\n _ref(ref) {\n this.circle = ref;\n }\n\n render() {\n return <RMFCircle\n {...this.props}\n ref={this._ref}\n onPress={this._onPress}\n />;\n }\n}\n\nMFCircle.propTypes = propTypes;\n// MFCircle.defaultProps = defaultProps;\n\nvar RMFCircle = requireNativeComponent(`RMFCircle`, MFCircle);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tB,MAAMK,SAAS,GAAGD,0BAAA,CAAcC,SAAhC;IACA,MAAMI,aAAa,GAAG,WAAtB;;IAEA,IAAI,CAACJ,SAAS,CAACK,oBAAf,EAAqC;MACnC;MACA,OAAOL,SAAS,CAACI,aAAD,CAAT,CAAyBE,QAAzB,CAAkCX,IAAlC,CAAP;IACD,CAPqB,CAStB;;;IACA,OAAOK,SAAS,CAACK,oBAAV,CAA+BD,aAA/B,EAA8CE,QAA9C,CAAuDX,IAAvD,CAAP;EACD;;EAEDQ,kBAAkB,CAACR,IAAD,EAAO;IACvB,OAAOI,0BAAA,CAAe,WAAf,EAA2BJ,IAA3B,CAAP;EACD;;EAEDlB,QAAQ,CAAC8B,KAAD,EAAQ;IACdA,KAAK,CAACC,eAAN;;IACE,IAAI,KAAKhC,KAAL,CAAWN,OAAf,EAAwB;MACtB,KAAKM,KAAL,CAAWN,OAAX,CAAmBqC,KAAnB;IACH;EACF;;EAED5B,IAAI,CAAC8B,GAAD,EAAM;IACR,KAAKf,MAAL,GAAce,GAAd;EACD;;EAEDC,MAAM,GAAG;IACP,oBAAO,6BAAC,SAAD,eACD,KAAKlC,KADJ;MAEL,GAAG,EAAE,KAAKG,IAFL;MAGL,OAAO,EAAE,KAAKF;IAHT,GAAP;EAKD;;AA1FoC;;;AA6FvCL,QAAQ,CAACpB,SAAT,GAAqBA,SAArB,C,CACA;;AAEA,IAAI2D,SAAS,GAAG,IAAAC,mCAAA,EAAwB,WAAxB,EAAoCxC,QAApC,CAAhB"}
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.MFDirectionsRenderer = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
|
|
12
|
+
var _deprecatedReactNativePropTypes = require("deprecated-react-native-prop-types");
|
|
13
|
+
|
|
14
|
+
var _reactNative = require("react-native");
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
+
|
|
18
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
19
|
+
|
|
20
|
+
const viewPropTypes = _deprecatedReactNativePropTypes.ViewPropTypes || View.propTypes;
|
|
21
|
+
const propTypes = { ...viewPropTypes,
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The directions to display on the map,
|
|
25
|
+
* retrieved as an array of array of coordinates to describe the routes.
|
|
26
|
+
* Similar to directions prop but has higher priority
|
|
27
|
+
*/
|
|
28
|
+
routes: _propTypes.default.arrayOf(_propTypes.default.arrayOf(_propTypes.default.shape({
|
|
29
|
+
latitude: _propTypes.default.number.isRequired,
|
|
30
|
+
longitude: _propTypes.default.number.isRequired
|
|
31
|
+
}))),
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* The directions to display on the map,
|
|
35
|
+
* retrieved as a json string from Get route Map4D API (/sdk/route).
|
|
36
|
+
* Similar to routes prop but with lower priority
|
|
37
|
+
*/
|
|
38
|
+
directions: _propTypes.default.string,
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* The index of the main route, default value is 0.
|
|
42
|
+
*/
|
|
43
|
+
activedIndex: _propTypes.default.number,
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* The active route stroke width.
|
|
47
|
+
*/
|
|
48
|
+
activeStrokeWidth: _propTypes.default.number,
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* The active route color.
|
|
52
|
+
*/
|
|
53
|
+
activeStrokeColor: _deprecatedReactNativePropTypes.ColorPropType,
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* The active route outline stroke width.
|
|
57
|
+
*/
|
|
58
|
+
activeOutlineWidth: _propTypes.default.number,
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* The active route outline color.
|
|
62
|
+
*/
|
|
63
|
+
activeOutlineColor: _deprecatedReactNativePropTypes.ColorPropType,
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* The inactive route stroke width.
|
|
67
|
+
*/
|
|
68
|
+
inactiveStrokeWidth: _propTypes.default.number,
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* The inactive route color.
|
|
72
|
+
*/
|
|
73
|
+
inactiveStrokeColor: _deprecatedReactNativePropTypes.ColorPropType,
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* The inactive route outline stroke width.
|
|
77
|
+
*/
|
|
78
|
+
inactiveOutlineWidth: _propTypes.default.number,
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* The inactive route outline color.
|
|
82
|
+
*/
|
|
83
|
+
inactiveOutlineColor: _deprecatedReactNativePropTypes.ColorPropType,
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* The options of the origin POI.
|
|
87
|
+
*/
|
|
88
|
+
originPOIOptions: _propTypes.default.shape({
|
|
89
|
+
coordinate: _propTypes.default.shape({
|
|
90
|
+
latitude: _propTypes.default.number.isRequired,
|
|
91
|
+
longitude: _propTypes.default.number.isRequired
|
|
92
|
+
}),
|
|
93
|
+
icon: _propTypes.default.shape({
|
|
94
|
+
uri: _propTypes.default.any.isRequired
|
|
95
|
+
}),
|
|
96
|
+
title: _propTypes.default.string,
|
|
97
|
+
titleColor: _deprecatedReactNativePropTypes.ColorPropType,
|
|
98
|
+
visible: _propTypes.default.bool
|
|
99
|
+
}),
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* The options of the destination POI.
|
|
103
|
+
*/
|
|
104
|
+
destinationPOIOptions: _propTypes.default.shape({
|
|
105
|
+
coordinate: _propTypes.default.shape({
|
|
106
|
+
latitude: _propTypes.default.number.isRequired,
|
|
107
|
+
longitude: _propTypes.default.number.isRequired
|
|
108
|
+
}),
|
|
109
|
+
icon: _propTypes.default.shape({
|
|
110
|
+
uri: _propTypes.default.any.isRequired
|
|
111
|
+
}),
|
|
112
|
+
title: _propTypes.default.string,
|
|
113
|
+
titleColor: _deprecatedReactNativePropTypes.ColorPropType,
|
|
114
|
+
visible: _propTypes.default.bool
|
|
115
|
+
}),
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Callback that is called when the user presses on the routes.
|
|
119
|
+
*/
|
|
120
|
+
onPress: _propTypes.default.func
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
class MFDirectionsRenderer extends _react.default.Component {
|
|
124
|
+
constructor(props) {
|
|
125
|
+
super(props);
|
|
126
|
+
this._ref = this._ref.bind(this);
|
|
127
|
+
this._onPress = this._onPress.bind(this);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
setActivedIndex(index) {
|
|
131
|
+
this._runCommand("setActivedIndex", [index]);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
setRoutes(routes) {
|
|
135
|
+
this._runCommand("setRoutes", [routes]);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
setDirections(directions) {
|
|
139
|
+
this._runCommand("setDirections", [directions]);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
render() {
|
|
143
|
+
let originPOIOptions = this.props.originPOIOptions;
|
|
144
|
+
|
|
145
|
+
if (originPOIOptions) {
|
|
146
|
+
if (originPOIOptions.titleColor) {
|
|
147
|
+
originPOIOptions.titleColor = (0, _reactNative.processColor)(originPOIOptions.titleColor);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
if (originPOIOptions.icon) {
|
|
151
|
+
let uri = _reactNative.Image.resolveAssetSource(originPOIOptions.icon.uri) || {
|
|
152
|
+
uri: originPOIOptions.icon.uri
|
|
153
|
+
};
|
|
154
|
+
originPOIOptions.icon = {
|
|
155
|
+
uri: uri.uri
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
let destinationPOIOptions = this.props.destinationPOIOptions;
|
|
161
|
+
|
|
162
|
+
if (destinationPOIOptions) {
|
|
163
|
+
if (destinationPOIOptions.titleColor) {
|
|
164
|
+
destinationPOIOptions.titleColor = (0, _reactNative.processColor)(destinationPOIOptions.titleColor);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
if (destinationPOIOptions.icon) {
|
|
168
|
+
let uri = _reactNative.Image.resolveAssetSource(destinationPOIOptions.icon.uri) || {
|
|
169
|
+
uri: destinationPOIOptions.icon.uri
|
|
170
|
+
};
|
|
171
|
+
destinationPOIOptions.icon = {
|
|
172
|
+
uri: uri.uri
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
return /*#__PURE__*/_react.default.createElement(RMFDirectionsRenderer, _extends({}, this.props, {
|
|
178
|
+
originPOIOptions: originPOIOptions,
|
|
179
|
+
destinationPOIOptions: destinationPOIOptions,
|
|
180
|
+
ref: this._ref,
|
|
181
|
+
onPress: this._onPress
|
|
182
|
+
}));
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
_ref(ref) {
|
|
186
|
+
this.renderer = ref;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
_onPress(event) {
|
|
190
|
+
event.stopPropagation();
|
|
191
|
+
|
|
192
|
+
if (this.props.onPress) {
|
|
193
|
+
this.props.onPress(event);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
_runCommand(name, args) {
|
|
198
|
+
switch (_reactNative.Platform.OS) {
|
|
199
|
+
case 'android':
|
|
200
|
+
_reactNative.NativeModules.UIManager.dispatchViewManagerCommand(this._getHandle(), this._uiManagerCommand(name), args);
|
|
201
|
+
|
|
202
|
+
break;
|
|
203
|
+
|
|
204
|
+
case 'ios':
|
|
205
|
+
this._mapManagerCommand(name)(this._getHandle(), ...args);
|
|
206
|
+
|
|
207
|
+
break;
|
|
208
|
+
|
|
209
|
+
default:
|
|
210
|
+
break;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
_getHandle() {
|
|
215
|
+
return (0, _reactNative.findNodeHandle)(this.renderer);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
_uiManagerCommand(name) {
|
|
219
|
+
const UIManager = _reactNative.NativeModules.UIManager;
|
|
220
|
+
const componentName = "RMFDirectionsRenderer";
|
|
221
|
+
|
|
222
|
+
if (!UIManager.getViewManagerConfig) {
|
|
223
|
+
// RN < 0.58
|
|
224
|
+
return UIManager[componentName].Commands[name];
|
|
225
|
+
} // RN >= 0.58
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
return UIManager.getViewManagerConfig(componentName).Commands[name];
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
_mapManagerCommand(name) {
|
|
232
|
+
return _reactNative.NativeModules[`RMFDirectionsRenderer`][name];
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
exports.MFDirectionsRenderer = MFDirectionsRenderer;
|
|
238
|
+
MFDirectionsRenderer.propTypes = propTypes;
|
|
239
|
+
var RMFDirectionsRenderer = (0, _reactNative.requireNativeComponent)(`RMFDirectionsRenderer`, MFDirectionsRenderer);
|
|
240
|
+
//# sourceMappingURL=MFDirectionsRenderer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["viewPropTypes","ViewPropTypes","View","propTypes","routes","PropTypes","arrayOf","shape","latitude","number","isRequired","longitude","directions","string","activedIndex","activeStrokeWidth","activeStrokeColor","ColorPropType","activeOutlineWidth","activeOutlineColor","inactiveStrokeWidth","inactiveStrokeColor","inactiveOutlineWidth","inactiveOutlineColor","originPOIOptions","coordinate","icon","uri","any","title","titleColor","visible","bool","destinationPOIOptions","onPress","func","MFDirectionsRenderer","React","Component","constructor","props","_ref","bind","_onPress","setActivedIndex","index","_runCommand","setRoutes","setDirections","render","processColor","Image","resolveAssetSource","ref","renderer","event","stopPropagation","name","args","Platform","OS","NativeModules","UIManager","dispatchViewManagerCommand","_getHandle","_uiManagerCommand","_mapManagerCommand","findNodeHandle","componentName","getViewManagerConfig","Commands","RMFDirectionsRenderer","requireNativeComponent"],"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;;AACA;;AACA;;AACA;;;;;;AASA,MAAMA,aAAa,GAAGC,6CAAA,IAAiBC,IAAI,CAACC,SAA5C;AAEA,MAAMA,SAAS,GAAG,EAChB,GAAGH,aADa;;EAGhB;AACF;AACA;AACA;AACA;EACEI,MAAM,EAAEC,kBAAA,CAAUC,OAAV,CACND,kBAAA,CAAUC,OAAV,CACED,kBAAA,CAAUE,KAAV,CAAgB;IACdC,QAAQ,EAAEH,kBAAA,CAAUI,MAAV,CAAiBC,UADb;IAEdC,SAAS,EAAEN,kBAAA,CAAUI,MAAV,CAAiBC;EAFd,CAAhB,CADF,CADM,CARQ;;EAiBhB;AACF;AACA;AACA;AACA;EACEE,UAAU,EAAEP,kBAAA,CAAUQ,MAtBN;;EAwBhB;AACF;AACA;EACEC,YAA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