react-native-maps 1.21.0-alpha.8 → 1.21.0-alpha.80
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/android/build.gradle +45 -14
- package/android/generated/RCTAppDependencyProvider.h +25 -0
- package/android/generated/RCTAppDependencyProvider.mm +55 -0
- package/android/generated/RCTModulesConformingToProtocolsProvider.h +18 -0
- package/android/generated/RCTModulesConformingToProtocolsProvider.mm +33 -0
- package/android/generated/RCTThirdPartyComponentsProvider.h +16 -0
- package/android/generated/RCTThirdPartyComponentsProvider.mm +26 -0
- package/android/generated/ReactAppDependencyProvider.podspec +34 -0
- package/android/generated/java/com/facebook/fbreact/specs/NativeAirMapsModuleSpec.java +63 -0
- package/android/generated/java/com/facebook/react/viewmanagers/RNMapsCalloutManagerDelegate.java +35 -0
- package/android/generated/java/com/facebook/react/viewmanagers/RNMapsCalloutManagerInterface.java +18 -0
- package/android/generated/java/com/facebook/react/viewmanagers/RNMapsGooglePolygonManagerDelegate.java +49 -0
- package/android/generated/java/com/facebook/react/viewmanagers/RNMapsGooglePolygonManagerInterface.java +24 -0
- package/android/generated/java/com/facebook/react/viewmanagers/RNMapsMapViewManagerDelegate.java +206 -0
- package/android/generated/java/com/facebook/react/viewmanagers/RNMapsMapViewManagerInterface.java +74 -0
- package/android/generated/java/com/facebook/react/viewmanagers/RNMapsMarkerManagerDelegate.java +104 -0
- package/android/generated/java/com/facebook/react/viewmanagers/RNMapsMarkerManagerInterface.java +40 -0
- package/android/generated/java/com/facebook/react/viewmanagers/RNMapsPolylineManagerDelegate.java +58 -0
- package/android/generated/java/com/facebook/react/viewmanagers/RNMapsPolylineManagerInterface.java +27 -0
- package/android/generated/jni/CMakeLists.txt +36 -0
- package/android/generated/jni/RNMapsSpecs-generated.cpp +68 -0
- package/android/generated/jni/RNMapsSpecs.h +31 -0
- package/android/generated/jni/react/renderer/components/RNMapsSpecs/ComponentDescriptors.cpp +27 -0
- package/android/generated/jni/react/renderer/components/RNMapsSpecs/ComponentDescriptors.h +29 -0
- package/android/generated/jni/react/renderer/components/RNMapsSpecs/EventEmitters.cpp +940 -0
- package/android/generated/jni/react/renderer/components/RNMapsSpecs/EventEmitters.h +809 -0
- package/android/generated/jni/react/renderer/components/RNMapsSpecs/Props.cpp +170 -0
- package/android/generated/jni/react/renderer/components/RNMapsSpecs/Props.h +1142 -0
- package/android/generated/jni/react/renderer/components/RNMapsSpecs/RNMapsSpecsJSI-generated.cpp +74 -0
- package/android/generated/jni/react/renderer/components/RNMapsSpecs/RNMapsSpecsJSI.h +268 -0
- package/android/generated/jni/react/renderer/components/RNMapsSpecs/ShadowNodes.cpp +22 -0
- package/android/generated/jni/react/renderer/components/RNMapsSpecs/ShadowNodes.h +87 -0
- package/android/generated/jni/react/renderer/components/RNMapsSpecs/States.cpp +16 -0
- package/android/generated/jni/react/renderer/components/RNMapsSpecs/States.h +89 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +1 -1
- package/android/gradlew +1 -2
- package/android/src/main/java/com/rnmaps/fabric/CalloutManager.java +77 -0
- package/android/src/main/java/com/rnmaps/fabric/JSONUtil.java +86 -0
- package/android/src/main/java/com/rnmaps/fabric/MapViewManager.java +618 -0
- package/android/src/main/java/com/rnmaps/fabric/MarkerManager.java +259 -0
- package/android/src/main/java/com/rnmaps/fabric/NativeAirMapsModule.java +156 -4
- package/android/src/main/java/com/rnmaps/fabric/PolygonManager.java +89 -0
- package/android/src/main/java/com/rnmaps/fabric/PolylineManager.java +121 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnCalloutPressEvent.java +25 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnDeselectEvent.java +28 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnDoublePressEvent.java +27 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnDragEndEvent.java +28 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnDragEvent.java +28 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnDragStartEvent.java +28 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnIndoorBuildingFocusedEvent.java +28 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnIndoorLevelActivatedEvent.java +28 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnLongPressEvent.java +28 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnMapLoadedEvent.java +29 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnMapReadyEvent.java +29 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnMarkerDeselectEvent.java +28 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnMarkerDragEndEvent.java +28 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnMarkerDragEvent.java +28 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnMarkerDragStartEvent.java +28 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnMarkerPressEvent.java +28 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnMarkerSelectEvent.java +28 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnPanDragEvent.java +28 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnPoiClickEvent.java +27 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnPressEvent.java +27 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnRegionChangeCompleteEvent.java +30 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnRegionChangeEvent.java +48 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnRegionChangeStartEvent.java +33 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnSelectEvent.java +28 -0
- package/android/src/main/java/com/rnmaps/fabric/event/OnUserLocationChangeEvent.java +28 -0
- package/android/src/main/java/com/rnmaps/maps/MapAirModulePackage.java +30 -2
- package/android/src/main/java/com/rnmaps/maps/MapCallout.java +18 -0
- package/android/src/main/java/com/rnmaps/maps/MapManager.java +14 -14
- package/android/src/main/java/com/rnmaps/maps/MapMarker.java +79 -3
- package/android/src/main/java/com/rnmaps/maps/MapModule.java +206 -206
- package/android/src/main/java/com/rnmaps/maps/MapPolygon.java +29 -0
- package/android/src/main/java/com/rnmaps/maps/MapPolyline.java +207 -141
- package/android/src/main/java/com/rnmaps/maps/MapPolylineManager.java +1 -16
- package/android/src/main/java/com/rnmaps/maps/MapView.java +1649 -1336
- package/ios/AirGoogleMaps/AIRGoogleMap.h +3 -2
- package/ios/AirGoogleMaps/AIRGoogleMap.m +155 -50
- package/ios/AirGoogleMaps/AIRGoogleMapCircle.m +23 -11
- package/ios/AirGoogleMaps/AIRGoogleMapManager.m +17 -28
- package/ios/AirGoogleMaps/AIRGoogleMapMarker.h +2 -0
- package/ios/AirGoogleMaps/AIRGoogleMapMarker.m +347 -243
- package/ios/AirGoogleMaps/AIRGoogleMapPolygon.h +2 -1
- package/ios/AirGoogleMaps/AIRGoogleMapPolygon.m +30 -0
- package/ios/AirGoogleMaps/AIRGoogleMapPolyline.h +0 -1
- package/ios/AirGoogleMaps/AIRGoogleMapPolyline.m +0 -7
- package/ios/AirGoogleMaps/AIRGoogleMapWMSTile.h +1 -1
- package/ios/AirGoogleMaps/AIRGoogleMapWMSTile.m +2 -2
- package/ios/AirGoogleMaps/RCTConvert+GMSMapViewType.m +2 -0
- package/ios/AirGoogleMaps/RNMapsGoogleMapView.h +3 -3
- package/ios/AirGoogleMaps/RNMapsGoogleMapView.mm +201 -60
- package/ios/AirGoogleMaps/RNMapsGooglePolygonView.h +26 -0
- package/ios/AirGoogleMaps/RNMapsGooglePolygonView.mm +217 -0
- package/ios/AirGoogleMaps/RNMapsGooglePolygonViewManager.mm +25 -0
- package/ios/AirMaps/AIRMap.h +5 -2
- package/ios/AirMaps/AIRMap.m +285 -153
- package/ios/AirMaps/AIRMapManager.m +6 -0
- package/ios/AirMaps/AIRMapMarker.h +1 -0
- package/ios/AirMaps/AIRMapMarker.m +165 -103
- package/ios/AirMaps/Callout/SMCalloutView.m +1 -1
- package/ios/AirMaps/RNMapsAirModule.h +1 -1
- package/ios/AirMaps/RNMapsAirModule.mm +42 -172
- package/ios/AirMaps/RNMapsAirModuleDelegate.h +24 -0
- package/ios/AirMaps/RNMapsHostVewDelegate.h +17 -0
- package/ios/AirMaps/RNMapsMapView.h +3 -3
- package/ios/AirMaps/RNMapsMapView.mm +340 -308
- package/ios/AirMaps/RNMapsMarkerView.h +24 -0
- package/ios/AirMaps/RNMapsMarkerView.mm +430 -0
- package/ios/AirMaps/RNMapsMarkerViewManager.mm +21 -0
- package/ios/AirMaps/UIView +AirMap.m +20 -0
- package/ios/AirMaps/UIView+AirMap.h +11 -0
- package/ios/AirMaps.xcodeproj/project.pbxproj +60 -0
- package/ios/generated/RCTAppDependencyProvider.h +25 -0
- package/ios/generated/RCTAppDependencyProvider.mm +55 -0
- package/ios/generated/RCTModulesConformingToProtocolsProvider.h +18 -0
- package/ios/generated/RCTModulesConformingToProtocolsProvider.mm +33 -0
- package/ios/generated/RCTThirdPartyComponentsProvider.h +16 -0
- package/ios/generated/RCTThirdPartyComponentsProvider.mm +26 -0
- package/ios/generated/RNMapsSpecs/ComponentDescriptors.cpp +27 -0
- package/ios/generated/RNMapsSpecs/ComponentDescriptors.h +29 -0
- package/ios/generated/RNMapsSpecs/EventEmitters.cpp +940 -0
- package/ios/generated/RNMapsSpecs/EventEmitters.h +809 -0
- package/ios/generated/RNMapsSpecs/Props.cpp +170 -0
- package/ios/generated/RNMapsSpecs/Props.h +1142 -0
- package/ios/generated/RNMapsSpecs/RCTComponentViewHelpers.h +595 -0
- package/ios/generated/RNMapsSpecs/RNMapsSpecs-generated.mm +92 -0
- package/ios/generated/RNMapsSpecs/RNMapsSpecs.h +137 -0
- package/ios/generated/RNMapsSpecs/ShadowNodes.cpp +22 -0
- package/ios/generated/RNMapsSpecs/ShadowNodes.h +87 -0
- package/ios/generated/RNMapsSpecs/States.cpp +16 -0
- package/ios/generated/RNMapsSpecs/States.h +89 -0
- package/ios/generated/RNMapsSpecsJSI-generated.cpp +74 -0
- package/ios/generated/RNMapsSpecsJSI.h +268 -0
- package/ios/generated/ReactAppDependencyProvider.podspec +34 -0
- package/lib/MapCircle.d.ts +1 -1
- package/lib/MapHeatmap.d.ts +2 -2
- package/lib/MapHeatmap.js +1 -1
- package/lib/MapMarker.d.ts +16 -3
- package/lib/MapMarker.js +53 -9
- package/lib/MapMarkerNativeComponent.js +0 -2
- package/lib/MapOverlay.js +2 -8
- package/lib/MapPolygon.d.ts +1 -1
- package/lib/MapPolyline.d.ts +7 -7
- package/lib/MapView.d.ts +14 -27
- package/lib/MapView.js +97 -103
- package/lib/MapView.types.d.ts +1 -1
- package/lib/createFabricMap.d.ts +1 -0
- package/lib/createFabricMap.js +15 -2
- package/lib/decorateMapComponent.js +30 -0
- package/lib/specs/NativeAirMapsModule.d.ts +2 -2
- package/lib/specs/NativeComponentCallout.d.ts +46 -0
- package/lib/specs/NativeComponentCallout.js +9 -0
- package/lib/specs/NativeComponentGoogleMapView.d.ts +15 -15
- package/lib/specs/NativeComponentGoogleMapView.js +1 -0
- package/lib/specs/NativeComponentGooglePolygon.d.ts +75 -0
- package/lib/specs/NativeComponentGooglePolygon.js +7 -0
- package/lib/specs/NativeComponentMapView.d.ts +28 -36
- package/lib/specs/NativeComponentMapView.js +2 -3
- package/lib/specs/NativeComponentMarker.d.ts +258 -0
- package/lib/specs/NativeComponentMarker.js +19 -0
- package/lib/specs/NativeComponentPolyline.d.ts +101 -0
- package/lib/specs/NativeComponentPolyline.js +7 -0
- package/package.json +25 -20
- package/react-native-maps.podspec +2 -1
package/lib/MapView.js
CHANGED
|
@@ -35,7 +35,10 @@ const NativeComponentMapView_1 = __importStar(require("./specs/NativeComponentMa
|
|
|
35
35
|
const NativeComponentGoogleMapView_1 = __importStar(require("./specs/NativeComponentGoogleMapView"));
|
|
36
36
|
const createFabricMap_1 = __importDefault(require("./createFabricMap"));
|
|
37
37
|
const FabricMap = (0, createFabricMap_1.default)(NativeComponentMapView_1.default, NativeComponentMapView_1.Commands);
|
|
38
|
-
|
|
38
|
+
var FabricGoogleMap = null;
|
|
39
|
+
if (react_native_1.Platform.OS === 'ios') {
|
|
40
|
+
FabricGoogleMap = (0, createFabricMap_1.default)(NativeComponentGoogleMapView_1.default, NativeComponentGoogleMapView_1.Commands);
|
|
41
|
+
}
|
|
39
42
|
exports.MAP_TYPES = {
|
|
40
43
|
STANDARD: 'standard',
|
|
41
44
|
SATELLITE: 'satellite',
|
|
@@ -55,7 +58,7 @@ class MapView extends React.Component {
|
|
|
55
58
|
this.map = React.createRef();
|
|
56
59
|
this.fabricMap = React.createRef();
|
|
57
60
|
this.state = {
|
|
58
|
-
isReady:
|
|
61
|
+
isReady: false,
|
|
59
62
|
};
|
|
60
63
|
this._onMapReady = this._onMapReady.bind(this);
|
|
61
64
|
this._onChange = this._onChange.bind(this);
|
|
@@ -85,13 +88,8 @@ class MapView extends React.Component {
|
|
|
85
88
|
}
|
|
86
89
|
}
|
|
87
90
|
getCamera() {
|
|
88
|
-
if (
|
|
89
|
-
return
|
|
90
|
-
}
|
|
91
|
-
else if (react_native_1.Platform.OS === 'ios') {
|
|
92
|
-
if (this.fabricMap.current) {
|
|
93
|
-
return this.fabricMap.current.getCamera();
|
|
94
|
-
}
|
|
91
|
+
if (this.fabricMap.current) {
|
|
92
|
+
return this.fabricMap.current.getCamera();
|
|
95
93
|
}
|
|
96
94
|
return Promise.reject('getCamera not supported on this platform');
|
|
97
95
|
}
|
|
@@ -119,6 +117,12 @@ class MapView extends React.Component {
|
|
|
119
117
|
MapViewNativeComponent_1.Commands.animateToRegion(this.map.current, region, duration);
|
|
120
118
|
}
|
|
121
119
|
}
|
|
120
|
+
setRegion(region) {
|
|
121
|
+
if (this.fabricMap.current) {
|
|
122
|
+
this.fabricMap.current.animateToRegion(region, 0);
|
|
123
|
+
}
|
|
124
|
+
//TODO fix for android
|
|
125
|
+
}
|
|
122
126
|
fitToElements(options = {}) {
|
|
123
127
|
const { edgePadding = { top: 0, right: 0, bottom: 0, left: 0 }, animated = true, } = options;
|
|
124
128
|
if (this.fabricMap.current) {
|
|
@@ -152,13 +156,8 @@ class MapView extends React.Component {
|
|
|
152
156
|
* @return Promise Promise with the bounding box ({ northEast: <LatLng>, southWest: <LatLng> })
|
|
153
157
|
*/
|
|
154
158
|
async getMapBoundaries() {
|
|
155
|
-
if (
|
|
156
|
-
return
|
|
157
|
-
}
|
|
158
|
-
else if (react_native_1.Platform.OS === 'ios') {
|
|
159
|
-
if (this.fabricMap.current) {
|
|
160
|
-
return this.fabricMap.current.getMapBoundaries();
|
|
161
|
-
}
|
|
159
|
+
if (this.fabricMap.current) {
|
|
160
|
+
return this.fabricMap.current.getMapBoundaries();
|
|
162
161
|
}
|
|
163
162
|
return Promise.reject('getMapBoundaries not supported on this platform');
|
|
164
163
|
}
|
|
@@ -168,9 +167,10 @@ class MapView extends React.Component {
|
|
|
168
167
|
}
|
|
169
168
|
}
|
|
170
169
|
setIndoorActiveLevelIndex(activeLevelIndex) {
|
|
171
|
-
if (this.
|
|
172
|
-
|
|
170
|
+
if (this.fabricMap.current) {
|
|
171
|
+
return this.fabricMap.current.setIndoorActiveLevelIndex(activeLevelIndex);
|
|
173
172
|
}
|
|
173
|
+
return Promise.reject('getMapBoundaries not supported on this platform');
|
|
174
174
|
}
|
|
175
175
|
/**
|
|
176
176
|
* Takes a snapshot of the map and saves it to a picture
|
|
@@ -202,15 +202,9 @@ class MapView extends React.Component {
|
|
|
202
202
|
if (config.result !== 'file' && config.result !== 'base64') {
|
|
203
203
|
throw new Error('Invalid result specified');
|
|
204
204
|
}
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
return
|
|
208
|
-
}
|
|
209
|
-
else if (react_native_1.Platform.OS === 'ios') {
|
|
210
|
-
if (this.fabricMap.current) {
|
|
211
|
-
// @ts-ignore
|
|
212
|
-
return this.fabricMap.current.takeSnapshot(config);
|
|
213
|
-
}
|
|
205
|
+
if (this.fabricMap.current) {
|
|
206
|
+
// @ts-ignore
|
|
207
|
+
return this.fabricMap.current.takeSnapshot(config);
|
|
214
208
|
}
|
|
215
209
|
return Promise.reject('takeSnapshot not supported on this platform');
|
|
216
210
|
}
|
|
@@ -282,11 +276,9 @@ class MapView extends React.Component {
|
|
|
282
276
|
* @return Promise Promise with { <identifier>: { point: Point, frame: Frame } }
|
|
283
277
|
*/
|
|
284
278
|
getMarkersFrames(onlyVisible = false) {
|
|
285
|
-
if (
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
return this.fabricMap.current.getMarkersFrames(onlyVisible);
|
|
289
|
-
}
|
|
279
|
+
if (this.fabricMap.current) {
|
|
280
|
+
// @ts-ignore
|
|
281
|
+
return this.fabricMap.current.getMarkersFrames(onlyVisible);
|
|
290
282
|
}
|
|
291
283
|
return Promise.reject('getMarkersFrames not supported on this platform');
|
|
292
284
|
}
|
|
@@ -344,82 +336,85 @@ class MapView extends React.Component {
|
|
|
344
336
|
this.props.onRegionChangeComplete(event.nativeEvent.region, details);
|
|
345
337
|
}
|
|
346
338
|
};
|
|
339
|
+
handleRegionChangeStarted = (event) => {
|
|
340
|
+
if (this.props.onRegionChangeStart) {
|
|
341
|
+
this.props.onRegionChangeStart(event);
|
|
342
|
+
}
|
|
343
|
+
};
|
|
344
|
+
handleIndoorBuildingFocused = (event) => {
|
|
345
|
+
if (this.props.onIndoorBuildingFocused) {
|
|
346
|
+
this.props.onIndoorBuildingFocused(event);
|
|
347
|
+
}
|
|
348
|
+
};
|
|
349
|
+
handleIndoorLevelActivated = (event) => {
|
|
350
|
+
if (this.props.onIndoorLevelActivated) {
|
|
351
|
+
this.props.onIndoorLevelActivated(event);
|
|
352
|
+
}
|
|
353
|
+
};
|
|
354
|
+
handleRegionChangeComplete = (event) => {
|
|
355
|
+
const isGesture = event.nativeEvent.isGesture;
|
|
356
|
+
const details = { isGesture };
|
|
357
|
+
if (this.props.onRegionChangeComplete) {
|
|
358
|
+
this.props.onRegionChangeComplete(event.nativeEvent.region, details);
|
|
359
|
+
}
|
|
360
|
+
};
|
|
347
361
|
render() {
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
362
|
+
// Define props specifically for MapFabricNativeProps
|
|
363
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
364
|
+
const { onCalloutPress, onIndoorBuildingFocused, onKmlReady, onLongPress, onMarkerDeselect, onMarkerPress, onMarkerSelect, onRegionChangeStart, onRegionChange, onRegionChangeComplete, onPress, minZoomLevel, maxZoomLevel, region, provider, children, ...restProps } = this.props;
|
|
365
|
+
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
366
|
+
const userInterfaceStyle = this.props.userInterfaceStyle || 'system';
|
|
367
|
+
const props = {
|
|
368
|
+
onMapReady: this._onMapReady,
|
|
369
|
+
liteMode: this.props.liteMode,
|
|
370
|
+
googleMapId: this.props.googleMapId,
|
|
371
|
+
googleRenderer: this.props.googleRenderer,
|
|
372
|
+
onPress: this.handleMapPress,
|
|
373
|
+
onMarkerPress: this.handleMarkerPress,
|
|
374
|
+
onMarkerSelect: this.handleMarkerSelect,
|
|
375
|
+
onMarkerDeselect: this.handleMarkerDeselect,
|
|
376
|
+
userInterfaceStyle: userInterfaceStyle,
|
|
377
|
+
minZoom: minZoomLevel,
|
|
378
|
+
maxZoom: maxZoomLevel,
|
|
379
|
+
onRegionChange: this.handleRegionChange,
|
|
380
|
+
onRegionChangeStart: this.handleRegionChangeStarted,
|
|
381
|
+
onRegionChangeComplete: this.handleRegionChangeComplete,
|
|
382
|
+
onIndoorBuildingFocused: this.handleIndoorBuildingFocused,
|
|
383
|
+
// @ts-ignore
|
|
384
|
+
onIndoorLevelActivated: this.handleIndoorLevelActivated,
|
|
385
|
+
...restProps,
|
|
386
|
+
};
|
|
387
|
+
if (this.props.region) {
|
|
388
|
+
props.region = {
|
|
389
|
+
latitude: this.props.region.latitude,
|
|
390
|
+
longitude: this.props.region.longitude,
|
|
391
|
+
latitudeDelta: this.props.region.latitudeDelta,
|
|
392
|
+
longitudeDelta: this.props.region.longitudeDelta,
|
|
368
393
|
};
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
latitudeDelta: this.props.region.latitudeDelta,
|
|
374
|
-
longitudeDelta: this.props.region.longitudeDelta,
|
|
375
|
-
};
|
|
376
|
-
}
|
|
377
|
-
if (!this.state.isReady) {
|
|
378
|
-
props.style = this.props.style;
|
|
379
|
-
props.initialCamera = this.props.initialCamera;
|
|
380
|
-
props.onLayout = this.props.onLayout;
|
|
381
|
-
}
|
|
382
|
-
if (provider === 'google') {
|
|
383
|
-
return (<decorateMapComponent_1.ProviderContext.Provider value={this.props.provider}>
|
|
384
|
-
<FabricGoogleMap {...props} ref={this.fabricMap}/>
|
|
385
|
-
</decorateMapComponent_1.ProviderContext.Provider>);
|
|
386
|
-
}
|
|
387
|
-
else {
|
|
388
|
-
return (<decorateMapComponent_1.ProviderContext.Provider value={this.props.provider}>
|
|
389
|
-
<FabricMap {...props} ref={this.fabricMap}/>
|
|
390
|
-
</decorateMapComponent_1.ProviderContext.Provider>);
|
|
394
|
+
}
|
|
395
|
+
if (this.state.isReady) {
|
|
396
|
+
if (props.onPanDrag) {
|
|
397
|
+
props.handlePanDrag = !!props.onPanDrag;
|
|
391
398
|
}
|
|
392
399
|
}
|
|
393
400
|
else {
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
: undefined,
|
|
408
|
-
...this.props,
|
|
409
|
-
};
|
|
410
|
-
if (this.state.isReady) {
|
|
411
|
-
if (props.onPanDrag) {
|
|
412
|
-
props.handlePanDrag = !!props.onPanDrag;
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
else {
|
|
416
|
-
props.style = this.props.style;
|
|
417
|
-
props.initialCamera = this.props.initialCamera;
|
|
418
|
-
props.onLayout = this.props.onLayout;
|
|
419
|
-
}
|
|
420
|
-
// Render AIRMap with NativeProps
|
|
401
|
+
props.style = this.props.style;
|
|
402
|
+
props.initialCamera = this.props.initialCamera;
|
|
403
|
+
props.onLayout = this.props.onLayout;
|
|
404
|
+
}
|
|
405
|
+
const childrenNodes = this.state.isReady ? children : null;
|
|
406
|
+
if (provider === 'google' && react_native_1.Platform.OS === 'ios') {
|
|
407
|
+
return (<decorateMapComponent_1.ProviderContext.Provider value={this.props.provider}>
|
|
408
|
+
<FabricGoogleMap {...props} ref={this.fabricMap}>
|
|
409
|
+
{childrenNodes}
|
|
410
|
+
</FabricGoogleMap>
|
|
411
|
+
</decorateMapComponent_1.ProviderContext.Provider>);
|
|
412
|
+
}
|
|
413
|
+
else {
|
|
421
414
|
return (<decorateMapComponent_1.ProviderContext.Provider value={this.props.provider}>
|
|
422
|
-
<
|
|
415
|
+
<FabricMap {...props} ref={this.fabricMap}>
|
|
416
|
+
{childrenNodes}
|
|
417
|
+
</FabricMap>
|
|
423
418
|
</decorateMapComponent_1.ProviderContext.Provider>);
|
|
424
419
|
}
|
|
425
420
|
}
|
|
@@ -436,7 +431,6 @@ else {
|
|
|
436
431
|
? (0, react_native_1.requireNativeComponent)('AIRGoogleMap')
|
|
437
432
|
: (0, decorateMapComponent_1.createNotSupportedComponent)('react-native-maps: AirGoogleMaps dir must be added to your xCode project to support GoogleMaps on iOS.');
|
|
438
433
|
}
|
|
439
|
-
const getNativeMapComponent = (provider) => airMaps[provider || 'default'];
|
|
440
434
|
exports.AnimatedMapView = react_native_1.Animated.createAnimatedComponent(MapView);
|
|
441
435
|
MapView.Animated = exports.AnimatedMapView;
|
|
442
436
|
exports.default = MapView;
|
package/lib/MapView.types.d.ts
CHANGED
|
@@ -46,7 +46,7 @@ export type ActiveIndoorLevel = {
|
|
|
46
46
|
shortName: string;
|
|
47
47
|
};
|
|
48
48
|
export type IndoorLevelActivatedEvent = NativeSyntheticEvent<{
|
|
49
|
-
|
|
49
|
+
indoorLevel: ActiveIndoorLevel;
|
|
50
50
|
}>;
|
|
51
51
|
export type IndoorBuilding = {
|
|
52
52
|
underground: boolean;
|
package/lib/createFabricMap.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export interface FabricMapHandle {
|
|
|
18
18
|
getAddressFromCoordinates: (coordinate: LatLng) => Promise<Address>;
|
|
19
19
|
getPointForCoordinate: (coordinate: LatLng) => Promise<Point>;
|
|
20
20
|
getCoordinateForPoint: (point: Point) => Promise<LatLng>;
|
|
21
|
+
setIndoorActiveLevelIndex: (activeLevelIndex: number) => void;
|
|
21
22
|
}
|
|
22
23
|
declare const createFabricMap: (ViewComponent: React.ComponentType, Commands: any) => React.ForwardRefExoticComponent<MapFabricNativeProps & React.RefAttributes<FabricMapHandle>>;
|
|
23
24
|
export default createFabricMap;
|
package/lib/createFabricMap.js
CHANGED
|
@@ -67,7 +67,7 @@ const createFabricMap = (ViewComponent, Commands) => {
|
|
|
67
67
|
},
|
|
68
68
|
async takeSnapshot(config) {
|
|
69
69
|
if (fabricRef.current) {
|
|
70
|
-
return NativeAirMapsModule_1.default.takeSnapshot((0, react_native_1.findNodeHandle)(fabricRef.current) ?? -1, config);
|
|
70
|
+
return NativeAirMapsModule_1.default.takeSnapshot((0, react_native_1.findNodeHandle)(fabricRef.current) ?? -1, JSON.stringify(config));
|
|
71
71
|
}
|
|
72
72
|
else {
|
|
73
73
|
throw new Error('takeSnapshot is only supported on iOS with Fabric.');
|
|
@@ -154,6 +154,19 @@ const createFabricMap = (ViewComponent, Commands) => {
|
|
|
154
154
|
throw new Error('fitToCoordinates is only supported on iOS with Fabric.');
|
|
155
155
|
}
|
|
156
156
|
},
|
|
157
|
+
setIndoorActiveLevelIndex(activeLevelIndex) {
|
|
158
|
+
if (fabricRef.current) {
|
|
159
|
+
try {
|
|
160
|
+
Commands.setIndoorActiveLevelIndex(fabricRef.current, activeLevelIndex);
|
|
161
|
+
}
|
|
162
|
+
catch (error) {
|
|
163
|
+
console.error('Failed to set camera:', error);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
else {
|
|
167
|
+
console.warn('setIndoorActiveLevelIndex is not supported.');
|
|
168
|
+
}
|
|
169
|
+
},
|
|
157
170
|
setCamera(camera) {
|
|
158
171
|
if (fabricRef.current) {
|
|
159
172
|
try {
|
|
@@ -164,7 +177,7 @@ const createFabricMap = (ViewComponent, Commands) => {
|
|
|
164
177
|
}
|
|
165
178
|
}
|
|
166
179
|
else {
|
|
167
|
-
console.warn('setCamera is
|
|
180
|
+
console.warn('setCamera is not supported');
|
|
168
181
|
}
|
|
169
182
|
},
|
|
170
183
|
}));
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.googleMapIsInstalled = exports.createNotSupportedComponent = exports.getNativeMapName = exports.ProviderContext = exports.NOT_SUPPORTED = exports.USES_DEFAULT_IMPLEMENTATION = exports.SUPPORTED = void 0;
|
|
4
7
|
const react_1 = require("react");
|
|
5
8
|
const react_native_1 = require("react-native");
|
|
6
9
|
const ProviderConstants_1 = require("./ProviderConstants");
|
|
10
|
+
const NativeComponentGooglePolygon_1 = __importDefault(require("./specs/NativeComponentGooglePolygon"));
|
|
11
|
+
const NativeComponentMarker_1 = __importDefault(require("./specs/NativeComponentMarker"));
|
|
12
|
+
const NativeComponentCallout_1 = __importDefault(require("./specs/NativeComponentCallout"));
|
|
13
|
+
const NativeComponentPolyline_1 = __importDefault(require("./specs/NativeComponentPolyline"));
|
|
7
14
|
exports.SUPPORTED = 'SUPPORTED';
|
|
8
15
|
exports.USES_DEFAULT_IMPLEMENTATION = 'USES_DEFAULT_IMPLEMENTATION';
|
|
9
16
|
exports.NOT_SUPPORTED = 'NOT_SUPPORTED';
|
|
@@ -34,6 +41,29 @@ function decorateMapComponent(Component, componentName, providers) {
|
|
|
34
41
|
Component.prototype.getNativeComponent =
|
|
35
42
|
function getNativeComponent() {
|
|
36
43
|
const provider = this.context;
|
|
44
|
+
if (componentName === 'Marker' &&
|
|
45
|
+
(react_native_1.Platform.OS !== 'ios' || provider !== ProviderConstants_1.PROVIDER_GOOGLE)) {
|
|
46
|
+
// @ts-ignore
|
|
47
|
+
return NativeComponentMarker_1.default;
|
|
48
|
+
}
|
|
49
|
+
if (componentName === 'Polygon' &&
|
|
50
|
+
((provider === ProviderConstants_1.PROVIDER_GOOGLE &&
|
|
51
|
+
react_native_1.Platform.OS === 'ios' &&
|
|
52
|
+
exports.googleMapIsInstalled) ||
|
|
53
|
+
react_native_1.Platform.OS === 'android')) {
|
|
54
|
+
// @ts-ignore
|
|
55
|
+
return NativeComponentGooglePolygon_1.default;
|
|
56
|
+
}
|
|
57
|
+
if (react_native_1.Platform.OS === 'android') {
|
|
58
|
+
if (componentName === 'Callout') {
|
|
59
|
+
// @ts-ignore
|
|
60
|
+
return NativeComponentCallout_1.default;
|
|
61
|
+
}
|
|
62
|
+
else if (componentName === 'Polyline') {
|
|
63
|
+
// @ts-ignore
|
|
64
|
+
return NativeComponentPolyline_1.default;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
37
67
|
const key = provider || 'default';
|
|
38
68
|
if (components[key]) {
|
|
39
69
|
return components[key];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TurboModule } from 'react-native';
|
|
2
|
-
import type { Double
|
|
2
|
+
import type { Double } from 'react-native/Libraries/Types/CodegenTypes';
|
|
3
3
|
import type { Camera } from './NativeComponentMapView';
|
|
4
4
|
import { Address } from 'react-native-maps';
|
|
5
5
|
type LatLng = {
|
|
@@ -22,7 +22,7 @@ export interface Spec extends TurboModule {
|
|
|
22
22
|
getCamera(tag: Double): Promise<Camera>;
|
|
23
23
|
getMarkersFrames(tag: Double, onlyVisible: boolean): Promise<unknown>;
|
|
24
24
|
getMapBoundaries(tag: Double): Promise<MapBoundaries>;
|
|
25
|
-
takeSnapshot(tag: Double, config:
|
|
25
|
+
takeSnapshot(tag: Double, config: string): Promise<string>;
|
|
26
26
|
getAddressFromCoordinates(tag: Double, coordinate: LatLng): Promise<Address>;
|
|
27
27
|
getPointForCoordinate(tag: Double, coordinate: LatLng): Promise<Point>;
|
|
28
28
|
getCoordinateForPoint(tag: Double, point: Point): Promise<LatLng>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { HostComponent, ViewProps } from 'react-native';
|
|
2
|
+
import { Double, BubblingEventHandler } from 'react-native/Libraries/Types/CodegenTypes';
|
|
3
|
+
export type LatLng = Readonly<{
|
|
4
|
+
latitude: Double;
|
|
5
|
+
longitude: Double;
|
|
6
|
+
}>;
|
|
7
|
+
export type CalloutPressEvent = BubblingEventHandler<Readonly<{
|
|
8
|
+
action?: string;
|
|
9
|
+
id: string;
|
|
10
|
+
coordinate: {
|
|
11
|
+
latitude: Double;
|
|
12
|
+
longitude: Double;
|
|
13
|
+
};
|
|
14
|
+
position?: {
|
|
15
|
+
x: Double;
|
|
16
|
+
y: Double;
|
|
17
|
+
};
|
|
18
|
+
}>>;
|
|
19
|
+
export interface CalloutFabricNativeProps extends ViewProps {
|
|
20
|
+
/**
|
|
21
|
+
* If `true`, clicks on transparent areas in callout will be passed to map.
|
|
22
|
+
*
|
|
23
|
+
* @default false
|
|
24
|
+
* @platform iOS: Supported
|
|
25
|
+
* @platform Android: Not supported
|
|
26
|
+
*/
|
|
27
|
+
alphaHitTest?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Callback that is called when the user presses on the callout
|
|
30
|
+
*
|
|
31
|
+
* @platform iOS: Apple Maps only
|
|
32
|
+
* @platform Android: Supported
|
|
33
|
+
*/
|
|
34
|
+
onPress?: CalloutPressEvent;
|
|
35
|
+
/**
|
|
36
|
+
* If `false`, a default "tooltip" bubble window will be drawn around this callouts children.
|
|
37
|
+
* If `true`, the child views can fully customize their appearance, including any "bubble" like styles.
|
|
38
|
+
*
|
|
39
|
+
* @default false
|
|
40
|
+
* @platform iOS: Supported
|
|
41
|
+
* @platform Android: Supported
|
|
42
|
+
*/
|
|
43
|
+
tooltip?: boolean;
|
|
44
|
+
}
|
|
45
|
+
declare const _default: HostComponent<CalloutFabricNativeProps>;
|
|
46
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const codegenNativeComponent_1 = __importDefault(require("react-native/Libraries/Utilities/codegenNativeComponent"));
|
|
7
|
+
exports.default = (0, codegenNativeComponent_1.default)('RNMapsCallout', {
|
|
8
|
+
excludedPlatforms: ['iOS'],
|
|
9
|
+
});
|
|
@@ -133,7 +133,7 @@ export type IndoorLevel = Readonly<{
|
|
|
133
133
|
shortName: string;
|
|
134
134
|
}>;
|
|
135
135
|
export type IndoorLevelActivatedEventHandler = DirectEventHandler<Readonly<{
|
|
136
|
-
|
|
136
|
+
indoorLevel: {
|
|
137
137
|
activeLevelIndex: Int32;
|
|
138
138
|
name: string;
|
|
139
139
|
shortName: string;
|
|
@@ -145,7 +145,7 @@ export type IndoorBuilding = Readonly<{
|
|
|
145
145
|
levels: ReadonlyArray<IndoorLevel>;
|
|
146
146
|
}>;
|
|
147
147
|
export type IndoorBuildingEventHandler = DirectEventHandler<Readonly<{
|
|
148
|
-
|
|
148
|
+
indoorBuilding: {
|
|
149
149
|
underground: boolean;
|
|
150
150
|
activeLevelIndex: Int32;
|
|
151
151
|
};
|
|
@@ -517,7 +517,7 @@ export interface MapFabricNativeProps extends ViewProps {
|
|
|
517
517
|
* @platform iOS: Google Maps only
|
|
518
518
|
* @platform Android: Supported
|
|
519
519
|
*/
|
|
520
|
-
pitchEnabled?: boolean
|
|
520
|
+
pitchEnabled?: WithDefault<boolean, true>;
|
|
521
521
|
/**
|
|
522
522
|
* The region to be displayed by the map.
|
|
523
523
|
* The region is defined by the center coordinates and the span of coordinates to display.
|
|
@@ -533,7 +533,7 @@ export interface MapFabricNativeProps extends ViewProps {
|
|
|
533
533
|
* @platform iOS: Google Maps only
|
|
534
534
|
* @platform Android: Supported
|
|
535
535
|
*/
|
|
536
|
-
rotateEnabled?: boolean
|
|
536
|
+
rotateEnabled?: WithDefault<boolean, true>;
|
|
537
537
|
/**
|
|
538
538
|
* If `false` the map will stay centered while rotating or zooming.
|
|
539
539
|
*
|
|
@@ -541,7 +541,7 @@ export interface MapFabricNativeProps extends ViewProps {
|
|
|
541
541
|
* @platform iOS: Google Maps only
|
|
542
542
|
* @platform Android: Supported
|
|
543
543
|
*/
|
|
544
|
-
scrollDuringRotateOrZoomEnabled?: boolean
|
|
544
|
+
scrollDuringRotateOrZoomEnabled?: WithDefault<boolean, true>;
|
|
545
545
|
/**
|
|
546
546
|
* If `false` the user won't be able to change the map region being displayed.
|
|
547
547
|
*
|
|
@@ -549,7 +549,7 @@ export interface MapFabricNativeProps extends ViewProps {
|
|
|
549
549
|
* @platform iOS: Supported
|
|
550
550
|
* @platform Android: Supported
|
|
551
551
|
*/
|
|
552
|
-
scrollEnabled?: boolean
|
|
552
|
+
scrollEnabled?: WithDefault<boolean, true>;
|
|
553
553
|
/**
|
|
554
554
|
* A Boolean indicating whether the map displays extruded building information.
|
|
555
555
|
*
|
|
@@ -557,7 +557,7 @@ export interface MapFabricNativeProps extends ViewProps {
|
|
|
557
557
|
* @platform iOS: Not supported
|
|
558
558
|
* @platform Android: Supported
|
|
559
559
|
*/
|
|
560
|
-
showsBuildings?: boolean
|
|
560
|
+
showsBuildings?: WithDefault<boolean, true>;
|
|
561
561
|
/**
|
|
562
562
|
* If `false` compass won't be displayed on the map.
|
|
563
563
|
*
|
|
@@ -565,7 +565,7 @@ export interface MapFabricNativeProps extends ViewProps {
|
|
|
565
565
|
* @platform iOS: Supported
|
|
566
566
|
* @platform Android: Supported
|
|
567
567
|
*/
|
|
568
|
-
showsCompass?: boolean
|
|
568
|
+
showsCompass?: WithDefault<boolean, true>;
|
|
569
569
|
/**
|
|
570
570
|
* A Boolean indicating whether indoor level picker should be enabled.
|
|
571
571
|
*
|
|
@@ -581,7 +581,7 @@ export interface MapFabricNativeProps extends ViewProps {
|
|
|
581
581
|
* @platform iOS: Google Maps only
|
|
582
582
|
* @platform Android: Supported
|
|
583
583
|
*/
|
|
584
|
-
showsIndoors?: boolean
|
|
584
|
+
showsIndoors?: WithDefault<boolean, true>;
|
|
585
585
|
/**
|
|
586
586
|
* If `false` hide the button to move map to the current user's location.
|
|
587
587
|
*
|
|
@@ -589,7 +589,7 @@ export interface MapFabricNativeProps extends ViewProps {
|
|
|
589
589
|
* @platform iOS: Google Maps only
|
|
590
590
|
* @platform Android: Supported
|
|
591
591
|
*/
|
|
592
|
-
showsMyLocationButton?: boolean
|
|
592
|
+
showsMyLocationButton?: WithDefault<boolean, true>;
|
|
593
593
|
/**
|
|
594
594
|
* If `false` points of interest won't be displayed on the map.
|
|
595
595
|
* TODO: DEPRECATED? Doesn't seem to do anything
|
|
@@ -609,7 +609,6 @@ export interface MapFabricNativeProps extends ViewProps {
|
|
|
609
609
|
showsScale?: boolean;
|
|
610
610
|
/**
|
|
611
611
|
* A Boolean value indicating whether the map displays traffic information.
|
|
612
|
-
* TODO: Look into android support
|
|
613
612
|
*
|
|
614
613
|
* @default false
|
|
615
614
|
* @platform iOS: Supported
|
|
@@ -630,8 +629,8 @@ export interface MapFabricNativeProps extends ViewProps {
|
|
|
630
629
|
* Sets the map to the style selected.
|
|
631
630
|
*
|
|
632
631
|
* @default System setting
|
|
633
|
-
* @platform iOS:
|
|
634
|
-
* @platform Android:
|
|
632
|
+
* @platform iOS: Supported
|
|
633
|
+
* @platform Android: Supported
|
|
635
634
|
*/
|
|
636
635
|
userInterfaceStyle?: WithDefault<'system' | 'light' | 'dark', 'system'>;
|
|
637
636
|
/**
|
|
@@ -689,7 +688,7 @@ export interface MapFabricNativeProps extends ViewProps {
|
|
|
689
688
|
* @platform iOS: Supported
|
|
690
689
|
* @platform Android: Supported
|
|
691
690
|
*/
|
|
692
|
-
zoomEnabled?: boolean
|
|
691
|
+
zoomEnabled?: WithDefault<boolean, true>;
|
|
693
692
|
/**
|
|
694
693
|
* If `false` the user won't be able to double tap to zoom the map.
|
|
695
694
|
* **Note:** But it will greatly decrease delay of tap gesture recognition.
|
|
@@ -698,7 +697,7 @@ export interface MapFabricNativeProps extends ViewProps {
|
|
|
698
697
|
* @platform iOS: Google Maps only
|
|
699
698
|
* @platform Android: Not supported
|
|
700
699
|
*/
|
|
701
|
-
zoomTapEnabled?: boolean
|
|
700
|
+
zoomTapEnabled?: WithDefault<boolean, true>;
|
|
702
701
|
}
|
|
703
702
|
export interface NativeCommands {
|
|
704
703
|
animateToRegion: (viewRef: React.ElementRef<React.ComponentType>, regionJSON: string, duration: Int32) => void;
|
|
@@ -707,6 +706,7 @@ export interface NativeCommands {
|
|
|
707
706
|
fitToElements: (viewRef: React.ElementRef<React.ComponentType>, edgePaddingJSON: string, animated: boolean) => void;
|
|
708
707
|
fitToSuppliedMarkers: (viewRef: React.ElementRef<React.ComponentType>, markersJSON: string, edgePaddingJSON: string, animated: boolean) => void;
|
|
709
708
|
fitToCoordinates: (viewRef: React.ElementRef<React.ComponentType>, coordinatesJSON: string, edgePaddingJSON: string, animated: boolean) => void;
|
|
709
|
+
setIndoorActiveLevelIndex: (viewRef: React.ElementRef<React.ComponentType>, activeLevelIndex: Int32) => void;
|
|
710
710
|
}
|
|
711
711
|
export declare const Commands: NativeCommands;
|
|
712
712
|
declare const _default: HostComponent<MapFabricNativeProps>;
|