react-native-maps 1.21.0-alpha.11 → 1.21.0-alpha.111
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 +77 -57
- 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/CircleManager.java +94 -0
- package/android/src/main/java/com/rnmaps/fabric/JSONUtil.java +86 -0
- package/android/src/main/java/com/rnmaps/fabric/MapViewManager.java +619 -0
- package/android/src/main/java/com/rnmaps/fabric/MarkerManager.java +258 -0
- package/android/src/main/java/com/rnmaps/fabric/NativeAirMapsModule.java +235 -2
- package/android/src/main/java/com/rnmaps/fabric/OverlayManager.java +95 -0
- 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/OnKmlReadyEvent.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 +39 -3
- package/android/src/main/java/com/rnmaps/maps/MapCallout.java +18 -0
- package/android/src/main/java/com/rnmaps/maps/MapCircle.java +24 -0
- package/android/src/main/java/com/rnmaps/maps/MapManager.java +14 -14
- package/android/src/main/java/com/rnmaps/maps/MapMarker.java +637 -556
- package/android/src/main/java/com/rnmaps/maps/MapMarkerManager.java +3 -3
- package/android/src/main/java/com/rnmaps/maps/MapModule.java +206 -206
- package/android/src/main/java/com/rnmaps/maps/MapOverlay.java +267 -151
- package/android/src/main/java/com/rnmaps/maps/MapPolygon.java +31 -1
- 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 +1650 -1337
- package/ios/AirGoogleMaps/AIRGMSMarker.h +1 -1
- package/ios/AirGoogleMaps/AIRGoogleMap.h +9 -10
- package/ios/AirGoogleMaps/AIRGoogleMap.m +112 -74
- package/ios/AirGoogleMaps/AIRGoogleMapCircle.m +23 -11
- package/ios/AirGoogleMaps/AIRGoogleMapManager.m +10 -9
- package/ios/AirGoogleMaps/AIRGoogleMapMarker.h +2 -0
- package/ios/AirGoogleMaps/AIRGoogleMapMarker.m +347 -243
- package/ios/AirGoogleMaps/AIRGoogleMapMarkerManager.m +1 -1
- 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/AIRGoogleMapUrlTile.m +2 -2
- package/ios/AirGoogleMaps/AIRGoogleMapWMSTile.h +1 -1
- package/ios/AirGoogleMaps/AIRGoogleMapWMSTile.m +4 -4
- package/ios/AirGoogleMaps/RCTConvert+GMSMapViewType.m +2 -0
- package/ios/AirGoogleMaps/RNMapsGoogleMapView.mm +137 -57
- package/ios/AirGoogleMaps/RNMapsGoogleMapViewManager.mm +16 -1
- package/ios/AirGoogleMaps/RNMapsGooglePolygonView.h +26 -0
- package/ios/AirGoogleMaps/RNMapsGooglePolygonView.mm +217 -0
- package/ios/AirGoogleMaps/RNMapsGooglePolygonViewManager.mm +26 -0
- package/ios/AirMaps/AIRMap.h +7 -7
- package/ios/AirMaps/AIRMap.m +227 -236
- package/ios/AirMaps/AIRMapManager.m +13 -7
- 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/NSObject+DynamicLoad.h +16 -0
- package/ios/AirMaps/NSObject+DynamicLoad.m +28 -0
- package/ios/AirMaps/RNMapsAirModule.h +1 -1
- package/ios/AirMaps/RNMapsAirModule.mm +4 -3
- package/ios/AirMaps/RNMapsAirModuleDelegate.h +2 -2
- package/ios/AirMaps/RNMapsMapView.mm +332 -295
- package/ios/AirMaps/RNMapsMapViewManager.mm +19 -1
- package/ios/AirMaps/RNMapsMarkerView.h +24 -0
- package/ios/AirMaps/RNMapsMarkerView.mm +430 -0
- package/ios/AirMaps/RNMapsMarkerViewManager.mm +28 -0
- package/ios/AirMaps.xcodeproj/project.pbxproj +20 -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 +55 -13
- package/lib/MapMarkerNativeComponent.js +0 -2
- package/lib/MapOverlay.d.ts +1 -0
- package/lib/MapOverlay.js +11 -9
- package/lib/MapPolygon.d.ts +1 -1
- package/lib/MapPolyline.d.ts +7 -7
- package/lib/MapView.d.ts +17 -29
- package/lib/MapView.js +114 -128
- package/lib/MapView.types.d.ts +1 -1
- package/lib/createFabricMap.d.ts +1 -0
- package/lib/createFabricMap.js +17 -4
- package/lib/decorateMapComponent.js +40 -0
- package/lib/fixImageProp.d.ts +4 -0
- package/lib/fixImageProp.js +16 -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/NativeComponentCircle.d.ts +74 -0
- package/lib/specs/NativeComponentCircle.js +7 -0
- package/lib/specs/NativeComponentGoogleMapView.d.ts +19 -22
- 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 +43 -56
- 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/NativeComponentOverlay.d.ts +67 -0
- package/lib/specs/NativeComponentOverlay.js +7 -0
- package/lib/specs/NativeComponentPolyline.d.ts +101 -0
- package/lib/specs/NativeComponentPolyline.js +7 -0
- package/package.json +21 -19
- package/react-native-maps.podspec +15 -15
- package/specs/NativeAirMapsModule.ts +36 -0
- package/specs/NativeComponentCallout.ts +63 -0
- package/specs/NativeComponentCircle.ts +94 -0
- package/specs/NativeComponentGoogleMapView.ts +913 -0
- package/specs/NativeComponentGooglePolygon.ts +94 -0
- package/specs/NativeComponentMapView.ts +1059 -0
- package/specs/NativeComponentMarker.ts +326 -0
- package/specs/NativeComponentOverlay.ts +89 -0
- package/specs/NativeComponentPolyline.ts +124 -0
package/lib/MapMarker.js
CHANGED
|
@@ -28,12 +28,16 @@ const React = __importStar(require("react"));
|
|
|
28
28
|
const react_native_1 = require("react-native");
|
|
29
29
|
const decorateMapComponent_1 = __importStar(require("./decorateMapComponent"));
|
|
30
30
|
const MapMarkerNativeComponent_1 = require("./MapMarkerNativeComponent");
|
|
31
|
+
const NativeComponentMarker_1 = require("./specs/NativeComponentMarker");
|
|
32
|
+
const ProviderConstants_1 = require("./ProviderConstants");
|
|
33
|
+
const fixImageProp_1 = require("./fixImageProp");
|
|
31
34
|
class MapMarker extends React.Component {
|
|
32
35
|
getNativeComponent;
|
|
33
36
|
getMapManagerCommand;
|
|
34
37
|
getUIManagerCommand;
|
|
35
38
|
static Animated;
|
|
36
39
|
marker;
|
|
40
|
+
fabricMarker = undefined;
|
|
37
41
|
constructor(props) {
|
|
38
42
|
super(props);
|
|
39
43
|
this.marker = React.createRef();
|
|
@@ -49,27 +53,59 @@ class MapMarker extends React.Component {
|
|
|
49
53
|
}
|
|
50
54
|
showCallout() {
|
|
51
55
|
if (this.marker.current) {
|
|
52
|
-
|
|
56
|
+
if (this.fabricMarker) {
|
|
57
|
+
// @ts-ignore
|
|
58
|
+
NativeComponentMarker_1.Commands.showCallout(this.marker.current);
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
MapMarkerNativeComponent_1.Commands.showCallout(this.marker.current);
|
|
62
|
+
}
|
|
53
63
|
}
|
|
54
64
|
}
|
|
55
65
|
hideCallout() {
|
|
56
66
|
if (this.marker.current) {
|
|
57
|
-
|
|
67
|
+
if (this.fabricMarker) {
|
|
68
|
+
// @ts-ignore
|
|
69
|
+
NativeComponentMarker_1.Commands.hideCallout(this.marker.current);
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
MapMarkerNativeComponent_1.Commands.hideCallout(this.marker.current);
|
|
73
|
+
}
|
|
58
74
|
}
|
|
59
75
|
}
|
|
60
76
|
setCoordinates(coordinate) {
|
|
61
77
|
if (this.marker.current) {
|
|
62
|
-
|
|
78
|
+
if (this.fabricMarker) {
|
|
79
|
+
NativeComponentMarker_1.Commands.setCoordinates(
|
|
80
|
+
// @ts-ignore
|
|
81
|
+
this.marker.current, coordinate.latitude, coordinate.longitude);
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
MapMarkerNativeComponent_1.Commands.setCoordinates(this.marker.current, coordinate);
|
|
85
|
+
}
|
|
63
86
|
}
|
|
64
87
|
}
|
|
65
88
|
redrawCallout() {
|
|
66
89
|
if (this.marker.current) {
|
|
67
|
-
|
|
90
|
+
if (this.fabricMarker) {
|
|
91
|
+
// @ts-ignore
|
|
92
|
+
NativeComponentMarker_1.Commands.redrawCallout(this.marker.current);
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
MapMarkerNativeComponent_1.Commands.redrawCallout(this.marker.current);
|
|
96
|
+
}
|
|
68
97
|
}
|
|
69
98
|
}
|
|
70
99
|
animateMarkerToCoordinate(coordinate, duration = 500) {
|
|
71
100
|
if (this.marker.current) {
|
|
72
|
-
|
|
101
|
+
if (this.fabricMarker) {
|
|
102
|
+
NativeComponentMarker_1.Commands.animateToCoordinates(
|
|
103
|
+
// @ts-ignore
|
|
104
|
+
this.marker.current, coordinate.latitude, coordinate.longitude, duration);
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
MapMarkerNativeComponent_1.Commands.animateMarkerToCoordinate(this.marker.current, coordinate, duration);
|
|
108
|
+
}
|
|
73
109
|
}
|
|
74
110
|
}
|
|
75
111
|
redraw() {
|
|
@@ -79,18 +115,24 @@ class MapMarker extends React.Component {
|
|
|
79
115
|
}
|
|
80
116
|
render() {
|
|
81
117
|
const { stopPropagation = false } = this.props;
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
image = image.uri || this.props.image;
|
|
118
|
+
if (this.fabricMarker === undefined) {
|
|
119
|
+
const provider = this.context;
|
|
120
|
+
this.fabricMarker = !(react_native_1.Platform.OS === 'ios' && provider === ProviderConstants_1.PROVIDER_GOOGLE);
|
|
86
121
|
}
|
|
87
122
|
let icon;
|
|
88
|
-
if (this.props.icon) {
|
|
89
|
-
icon =
|
|
90
|
-
|
|
123
|
+
if (this.props.icon && this.fabricMarker) {
|
|
124
|
+
icon = (0, fixImageProp_1.fixImageProp)(this.props.icon);
|
|
125
|
+
}
|
|
126
|
+
let image;
|
|
127
|
+
if (this.props.image && this.fabricMarker) {
|
|
128
|
+
image = (0, fixImageProp_1.fixImageProp)(this.props.image);
|
|
91
129
|
}
|
|
92
130
|
const AIRMapMarker = this.getNativeComponent();
|
|
93
|
-
return (<AIRMapMarker {...this.props} ref={this.marker}
|
|
131
|
+
return (<AIRMapMarker {...this.props} ref={this.marker}
|
|
132
|
+
// @ts-ignore
|
|
133
|
+
image={image}
|
|
134
|
+
// @ts-ignore
|
|
135
|
+
icon={icon} style={[styles.marker, this.props.style]} onPress={event => {
|
|
94
136
|
if (stopPropagation) {
|
|
95
137
|
event.stopPropagation();
|
|
96
138
|
}
|
package/lib/MapOverlay.d.ts
CHANGED
|
@@ -60,6 +60,7 @@ export declare class MapOverlay extends React.Component<MapOverlayProps> {
|
|
|
60
60
|
getMapManagerCommand: (name: string) => MapManagerCommand;
|
|
61
61
|
getUIManagerCommand: (name: string) => UIManagerCommand;
|
|
62
62
|
static Animated: Animated.AnimatedComponent<typeof MapOverlay>;
|
|
63
|
+
private fabricOverlay?;
|
|
63
64
|
render(): React.JSX.Element;
|
|
64
65
|
}
|
|
65
66
|
type Coordinate = [number, number];
|
package/lib/MapOverlay.js
CHANGED
|
@@ -27,24 +27,26 @@ exports.MapOverlay = void 0;
|
|
|
27
27
|
const React = __importStar(require("react"));
|
|
28
28
|
const react_native_1 = require("react-native");
|
|
29
29
|
const decorateMapComponent_1 = __importStar(require("./decorateMapComponent"));
|
|
30
|
+
const fixImageProp_1 = require("./fixImageProp");
|
|
30
31
|
class MapOverlay extends React.Component {
|
|
31
32
|
getNativeComponent;
|
|
32
33
|
getMapManagerCommand;
|
|
33
34
|
getUIManagerCommand;
|
|
34
35
|
static Animated;
|
|
36
|
+
fabricOverlay = undefined;
|
|
35
37
|
render() {
|
|
36
38
|
const { opacity = 1.0 } = this.props;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
this.props.image.uri?.startsWith('http')) {
|
|
40
|
-
image = this.props.image.uri;
|
|
41
|
-
}
|
|
42
|
-
else {
|
|
43
|
-
const sourceAsset = react_native_1.Image.resolveAssetSource(this.props.image) || {};
|
|
44
|
-
image = sourceAsset.uri;
|
|
39
|
+
if (this.fabricOverlay === undefined) {
|
|
40
|
+
this.fabricOverlay = react_native_1.Platform.OS === 'android';
|
|
45
41
|
}
|
|
46
42
|
const AIRMapOverlay = this.getNativeComponent();
|
|
47
|
-
|
|
43
|
+
let image = this.props.image;
|
|
44
|
+
if (this.props.image && this.fabricOverlay) {
|
|
45
|
+
image = (0, fixImageProp_1.fixImageProp)(this.props.image);
|
|
46
|
+
}
|
|
47
|
+
return (<AIRMapOverlay {...this.props} opacity={opacity}
|
|
48
|
+
// @ts-ignore
|
|
49
|
+
image={image} style={[styles.overlay, this.props.style]}/>);
|
|
48
50
|
}
|
|
49
51
|
}
|
|
50
52
|
exports.MapOverlay = MapOverlay;
|
package/lib/MapPolygon.d.ts
CHANGED
|
@@ -124,7 +124,7 @@ export type MapPolygonProps = ViewProps & {
|
|
|
124
124
|
zIndex?: number;
|
|
125
125
|
};
|
|
126
126
|
type NativeProps = MapPolygonProps & {
|
|
127
|
-
ref: React.RefObject<View>;
|
|
127
|
+
ref: React.RefObject<View | null>;
|
|
128
128
|
};
|
|
129
129
|
export declare class MapPolygon extends React.Component<MapPolygonProps> {
|
|
130
130
|
context: React.ContextType<typeof ProviderContext>;
|
package/lib/MapPolyline.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export type MapPolylineProps = ViewProps & {
|
|
|
14
14
|
* The fill color to use for the path.
|
|
15
15
|
*
|
|
16
16
|
* @default `#000`, `rgba(r,g,b,0.5)`
|
|
17
|
-
* @platform iOS:
|
|
17
|
+
* @platform iOS: Apple Maps only
|
|
18
18
|
* @platform Android: Not supported
|
|
19
19
|
*/
|
|
20
20
|
fillColor?: string;
|
|
@@ -32,8 +32,8 @@ export type MapPolylineProps = ViewProps & {
|
|
|
32
32
|
*
|
|
33
33
|
* @default `round`
|
|
34
34
|
* @platform iOS: Apple Maps only
|
|
35
|
-
* @platform Android:
|
|
36
|
-
*/
|
|
35
|
+
* @platform Android: supported
|
|
36
|
+
* */
|
|
37
37
|
lineCap?: LineCapType;
|
|
38
38
|
/**
|
|
39
39
|
* An array of numbers specifying the dash pattern to use for the path.
|
|
@@ -42,8 +42,8 @@ export type MapPolylineProps = ViewProps & {
|
|
|
42
42
|
* The values in the array alternate, starting with the first line segment length,
|
|
43
43
|
* followed by the first gap length, followed by the second line segment length, and so on.
|
|
44
44
|
*
|
|
45
|
-
* @platform iOS:
|
|
46
|
-
* @platform Android:
|
|
45
|
+
* @platform iOS: Apple Maps only
|
|
46
|
+
* @platform Android: supported
|
|
47
47
|
*/
|
|
48
48
|
lineDashPattern?: number[];
|
|
49
49
|
/**
|
|
@@ -60,7 +60,7 @@ export type MapPolylineProps = ViewProps & {
|
|
|
60
60
|
* The line join style to apply to corners of the path.
|
|
61
61
|
*
|
|
62
62
|
* @platform iOS: Apple Maps only
|
|
63
|
-
* @platform Android:
|
|
63
|
+
* @platform Android: supported
|
|
64
64
|
*/
|
|
65
65
|
lineJoin?: LineJoinType;
|
|
66
66
|
/**
|
|
@@ -125,7 +125,7 @@ export type MapPolylineProps = ViewProps & {
|
|
|
125
125
|
zIndex?: number;
|
|
126
126
|
};
|
|
127
127
|
type NativeProps = MapPolylineProps & {
|
|
128
|
-
ref: React.RefObject<View>;
|
|
128
|
+
ref: React.RefObject<View | null>;
|
|
129
129
|
};
|
|
130
130
|
export declare class MapPolyline extends React.Component<MapPolylineProps> {
|
|
131
131
|
context: React.ContextType<typeof ProviderContext>;
|
package/lib/MapView.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Animated as RNAnimated, Animated, NativeSyntheticEvent, ViewProps } from 'react-native';
|
|
3
3
|
import { CalloutPressEvent, ClickEvent, Frame, LatLng, MarkerDeselectEvent, MarkerDragEvent, MarkerDragStartEndEvent, MarkerPressEvent, MarkerSelectEvent, Point, Provider, Region } from './sharedTypes';
|
|
4
|
-
import { Address, BoundingBox, Camera, CameraZoomRange, ChangeEvent, Details, EdgePadding, FitToOptions,
|
|
4
|
+
import { ActiveIndoorLevel, Address, BoundingBox, Camera, CameraZoomRange, ChangeEvent, Details, EdgePadding, FitToOptions, IndoorBuilding, KmlMapEvent, LongPressEvent, MapPressEvent, MapStyleElement, MapType, MapTypes, PanDragEvent, PoiClickEvent, SnapshotOptions, UserLocationChangeEvent } from './MapView.types';
|
|
5
5
|
import { Modify } from './sharedTypesInternal';
|
|
6
6
|
import { MapViewNativeComponentType } from './MapViewNativeComponent';
|
|
7
7
|
import AnimatedRegion from './AnimatedRegion';
|
|
@@ -217,14 +217,14 @@ export type MapViewProps = ViewProps & {
|
|
|
217
217
|
* @platform iOS: Google Maps only
|
|
218
218
|
* @platform Android: Supported
|
|
219
219
|
*/
|
|
220
|
-
onIndoorBuildingFocused?: (
|
|
220
|
+
onIndoorBuildingFocused?: (indoorBuilding: IndoorBuilding) => void;
|
|
221
221
|
/**
|
|
222
222
|
* Callback that is called when a level on indoor building is activated
|
|
223
223
|
*
|
|
224
224
|
* @platform iOS: Google Maps only
|
|
225
225
|
* @platform Android: Supported
|
|
226
226
|
*/
|
|
227
|
-
onIndoorLevelActivated?: (
|
|
227
|
+
onIndoorLevelActivated?: (indoorLevel: ActiveIndoorLevel) => void;
|
|
228
228
|
/**
|
|
229
229
|
* Callback that is called once the kml is fully loaded.
|
|
230
230
|
*
|
|
@@ -245,7 +245,7 @@ export type MapViewProps = ViewProps & {
|
|
|
245
245
|
* @platform iOS: Google Maps only
|
|
246
246
|
* @platform Android: Supported
|
|
247
247
|
*/
|
|
248
|
-
onMapLoaded?: (event: NativeSyntheticEvent<
|
|
248
|
+
onMapLoaded?: (event: NativeSyntheticEvent<null>) => void;
|
|
249
249
|
/**
|
|
250
250
|
* Callback that is called once the map is ready.
|
|
251
251
|
*
|
|
@@ -255,7 +255,7 @@ export type MapViewProps = ViewProps & {
|
|
|
255
255
|
* @platform iOS: Supported
|
|
256
256
|
* @platform Android: Supported
|
|
257
257
|
*/
|
|
258
|
-
onMapReady?: (event?: NativeSyntheticEvent<
|
|
258
|
+
onMapReady?: (event?: NativeSyntheticEvent<null>) => void;
|
|
259
259
|
/**
|
|
260
260
|
* Callback that is called when a marker on the map becomes deselected.
|
|
261
261
|
* This will be called when the callout for that marker is about to be hidden.
|
|
@@ -426,7 +426,7 @@ export type MapViewProps = ViewProps & {
|
|
|
426
426
|
* If `false` compass won't be displayed on the map.
|
|
427
427
|
*
|
|
428
428
|
* @default true
|
|
429
|
-
* @platform iOS: Supported
|
|
429
|
+
* @platform iOS: Supported (adaptive on Apple Maps, visible only if map is not pointing north)
|
|
430
430
|
* @platform Android: Supported
|
|
431
431
|
*/
|
|
432
432
|
showsCompass?: boolean;
|
|
@@ -454,32 +454,14 @@ export type MapViewProps = ViewProps & {
|
|
|
454
454
|
* @platform Android: Supported
|
|
455
455
|
*/
|
|
456
456
|
showsMyLocationButton?: boolean;
|
|
457
|
-
/**
|
|
458
|
-
* If `false` points of interest won't be displayed on the map.
|
|
459
|
-
* TODO: DEPRECATED? Doesn't seem to do anything
|
|
460
|
-
*
|
|
461
|
-
* @default true
|
|
462
|
-
* @platform iOS: Maybe Apple Maps?
|
|
463
|
-
* @platform Android: Not supported
|
|
464
|
-
*/
|
|
465
|
-
showsPointsOfInterest?: boolean;
|
|
466
457
|
/**
|
|
467
458
|
* A Boolean indicating whether the map shows scale information.
|
|
468
459
|
*
|
|
469
|
-
* @default
|
|
460
|
+
* @default false
|
|
470
461
|
* @platform iOS: Apple Maps only
|
|
471
462
|
* @platform Android: Not supported
|
|
472
463
|
*/
|
|
473
464
|
showsScale?: boolean;
|
|
474
|
-
/**
|
|
475
|
-
* A Boolean value indicating whether the map displays traffic information.
|
|
476
|
-
* TODO: Look into android support
|
|
477
|
-
*
|
|
478
|
-
* @default false
|
|
479
|
-
* @platform iOS: Supported
|
|
480
|
-
* @platform Android: Not supported?
|
|
481
|
-
*/
|
|
482
|
-
showsTraffic?: boolean;
|
|
483
465
|
/**
|
|
484
466
|
* If `true` the users location will be displayed on the map.
|
|
485
467
|
*
|
|
@@ -510,8 +492,8 @@ export type MapViewProps = ViewProps & {
|
|
|
510
492
|
* Sets the map to the style selected.
|
|
511
493
|
*
|
|
512
494
|
* @default System setting
|
|
513
|
-
* @platform iOS:
|
|
514
|
-
* @platform Android:
|
|
495
|
+
* @platform iOS: Supported
|
|
496
|
+
* @platform Android: Supported
|
|
515
497
|
*/
|
|
516
498
|
userInterfaceStyle?: 'light' | 'dark';
|
|
517
499
|
/**
|
|
@@ -604,7 +586,7 @@ type ModifiedProps = Modify<MapViewProps, {
|
|
|
604
586
|
initialRegion?: MapViewProps['initialRegion'] | null;
|
|
605
587
|
}>;
|
|
606
588
|
export type NativeProps = Omit<ModifiedProps, 'customMapStyle' | 'onRegionChange' | 'onRegionChangeComplete'> & {
|
|
607
|
-
ref: React.RefObject<MapViewNativeComponentType>;
|
|
589
|
+
ref: React.RefObject<MapViewNativeComponentType | null>;
|
|
608
590
|
customMapStyleString?: string;
|
|
609
591
|
handlePanDrag?: boolean;
|
|
610
592
|
onChange?: (e: ChangeEvent) => void;
|
|
@@ -626,6 +608,7 @@ declare class MapView extends React.Component<MapViewProps, State> {
|
|
|
626
608
|
duration?: number;
|
|
627
609
|
}): void;
|
|
628
610
|
animateToRegion(region: Region, duration?: number): void;
|
|
611
|
+
setRegion(region: Region): void;
|
|
629
612
|
fitToElements(options?: FitToOptions): void;
|
|
630
613
|
fitToSuppliedMarkers(markers: string[], options?: FitToOptions): void;
|
|
631
614
|
fitToCoordinates(coordinates?: LatLng[], options?: FitToOptions): void;
|
|
@@ -636,7 +619,7 @@ declare class MapView extends React.Component<MapViewProps, State> {
|
|
|
636
619
|
*/
|
|
637
620
|
getMapBoundaries(): Promise<BoundingBox>;
|
|
638
621
|
setMapBoundaries(northEast: LatLng, southWest: LatLng): void;
|
|
639
|
-
setIndoorActiveLevelIndex(activeLevelIndex: number): void
|
|
622
|
+
setIndoorActiveLevelIndex(activeLevelIndex: number): void | Promise<never>;
|
|
640
623
|
/**
|
|
641
624
|
* Takes a snapshot of the map and saves it to a picture
|
|
642
625
|
* file or returns the image as a base64 encoded string.
|
|
@@ -707,8 +690,13 @@ declare class MapView extends React.Component<MapViewProps, State> {
|
|
|
707
690
|
private handleMapPress;
|
|
708
691
|
private handleMarkerPress;
|
|
709
692
|
private handleMarkerSelect;
|
|
693
|
+
private handleKmlReady;
|
|
710
694
|
private handleMarkerDeselect;
|
|
711
695
|
private handleRegionChange;
|
|
696
|
+
private handleRegionChangeStarted;
|
|
697
|
+
private handleIndoorBuildingFocused;
|
|
698
|
+
private handleIndoorLevelActivated;
|
|
699
|
+
private handleRegionChangeComplete;
|
|
712
700
|
render(): React.JSX.Element;
|
|
713
701
|
}
|
|
714
702
|
export declare const AnimatedMapView: RNAnimated.AnimatedComponent<typeof MapView>;
|