react-native-maps 1.24.11 → 1.24.13
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/src/main/java/com/rnmaps/fabric/MarkerManager.java +2 -1
- package/android/src/main/java/com/rnmaps/maps/MapMarker.java +12 -0
- package/android/src/main/java/com/rnmaps/maps/MapView.java +3 -5
- package/package.json +1 -1
- package/src/MapMarker.tsx +6 -1
- package/src/MapMarkerNativeComponent.ts +1 -0
- package/src/MapView.tsx +9 -0
- package/src/createFabricMap.tsx +202 -219
- package/src/specs/NativeComponentGoogleMapView.ts +9 -8
- package/src/specs/NativeComponentMapView.ts +9 -8
|
@@ -262,8 +262,9 @@ public class MarkerManager extends ViewGroupManager<MapMarker> implements RNMaps
|
|
|
262
262
|
|
|
263
263
|
@Override
|
|
264
264
|
public void redraw(MapMarker view) {
|
|
265
|
-
view.
|
|
265
|
+
view.redraw();
|
|
266
266
|
}
|
|
267
|
+
|
|
267
268
|
@Override
|
|
268
269
|
public void addView(MapMarker parent, View child, int index) {
|
|
269
270
|
// if an <Callout /> component is a child, then it is a callout view, NOT part of the
|
|
@@ -14,6 +14,9 @@ import android.animation.ObjectAnimator;
|
|
|
14
14
|
import android.util.Property;
|
|
15
15
|
import android.animation.TypeEvaluator;
|
|
16
16
|
|
|
17
|
+
import android.os.Handler;
|
|
18
|
+
import android.os.Looper;
|
|
19
|
+
|
|
17
20
|
import androidx.annotation.Nullable;
|
|
18
21
|
|
|
19
22
|
import com.facebook.common.references.CloseableReference;
|
|
@@ -565,6 +568,15 @@ public class MapMarker extends MapFeature {
|
|
|
565
568
|
update(true);
|
|
566
569
|
}
|
|
567
570
|
|
|
571
|
+
public void redraw() {
|
|
572
|
+
new Handler(Looper.getMainLooper()).post(new Runnable() {
|
|
573
|
+
@Override
|
|
574
|
+
public void run() {
|
|
575
|
+
updateMarkerIcon();
|
|
576
|
+
}
|
|
577
|
+
});
|
|
578
|
+
}
|
|
579
|
+
|
|
568
580
|
private Bitmap mLastBitmapCreated = null;
|
|
569
581
|
|
|
570
582
|
private void clearDrawableCache() {
|
|
@@ -24,8 +24,6 @@ import android.widget.RelativeLayout;
|
|
|
24
24
|
import androidx.annotation.NonNull;
|
|
25
25
|
import androidx.annotation.Nullable;
|
|
26
26
|
import androidx.core.content.PermissionChecker;
|
|
27
|
-
import androidx.core.view.GestureDetectorCompat;
|
|
28
|
-
import androidx.core.view.MotionEventCompat;
|
|
29
27
|
|
|
30
28
|
import com.facebook.react.common.MapBuilder;
|
|
31
29
|
|
|
@@ -144,7 +142,7 @@ public class MapView extends com.google.android.gms.maps.MapView implements Goog
|
|
|
144
142
|
private final Map<GroundOverlay, MapOverlay> overlayMap = new HashMap<>();
|
|
145
143
|
private final Map<TileOverlay, MapHeatmap> heatmapMap = new HashMap<>();
|
|
146
144
|
private final Map<TileOverlay, MapGradientPolyline> gradientPolylineMap = new HashMap<>();
|
|
147
|
-
private final
|
|
145
|
+
private final GestureDetector gestureDetector;
|
|
148
146
|
private boolean paused = false;
|
|
149
147
|
private boolean destroyed = false;
|
|
150
148
|
private final ThemedReactContext context;
|
|
@@ -259,7 +257,7 @@ public class MapView extends com.google.android.gms.maps.MapView implements Goog
|
|
|
259
257
|
fusedLocationSource = new FusedLocationSource(context);
|
|
260
258
|
|
|
261
259
|
gestureDetector =
|
|
262
|
-
new
|
|
260
|
+
new GestureDetector(context, new GestureDetector.SimpleOnGestureListener() {
|
|
263
261
|
|
|
264
262
|
@Override
|
|
265
263
|
public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX,
|
|
@@ -1512,7 +1510,7 @@ public class MapView extends com.google.android.gms.maps.MapView implements Goog
|
|
|
1512
1510
|
tapLocation = map.getProjection().fromScreenLocation(new Point(X, Y));
|
|
1513
1511
|
}
|
|
1514
1512
|
|
|
1515
|
-
int action =
|
|
1513
|
+
int action = ev.getActionMasked();
|
|
1516
1514
|
|
|
1517
1515
|
switch (action) {
|
|
1518
1516
|
case (MotionEvent.ACTION_DOWN):
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"author": "Leland Richardson <leland.m.richardson@gmail.com>",
|
|
7
7
|
"homepage": "https://github.com/react-native-maps/react-native-maps#readme",
|
|
8
|
-
"version": "1.24.
|
|
8
|
+
"version": "1.24.13",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"scripts": {
|
|
11
11
|
"lint": "eslint . --max-warnings 0",
|
package/src/MapMarker.tsx
CHANGED
|
@@ -468,7 +468,12 @@ export class MapMarker extends React.Component<MapMarkerProps> {
|
|
|
468
468
|
|
|
469
469
|
redraw() {
|
|
470
470
|
if (this.marker.current) {
|
|
471
|
-
|
|
471
|
+
if (this.fabricMarker) {
|
|
472
|
+
// @ts-ignore
|
|
473
|
+
FabricCommands.redraw(this.marker.current);
|
|
474
|
+
} else {
|
|
475
|
+
Commands.redraw(this.marker.current);
|
|
476
|
+
}
|
|
472
477
|
}
|
|
473
478
|
}
|
|
474
479
|
|
package/src/MapView.tsx
CHANGED
|
@@ -596,6 +596,15 @@ export type MapViewProps = ViewProps & {
|
|
|
596
596
|
*/
|
|
597
597
|
showsScale?: boolean;
|
|
598
598
|
|
|
599
|
+
/**
|
|
600
|
+
* A Boolean value indicating whether the map displays traffic information.
|
|
601
|
+
*
|
|
602
|
+
* @default false
|
|
603
|
+
* @platform iOS: Supported
|
|
604
|
+
* @platform Android: Supported
|
|
605
|
+
*/
|
|
606
|
+
showsTraffic?: boolean;
|
|
607
|
+
|
|
599
608
|
/**
|
|
600
609
|
* If `true` the users location will be displayed on the map.
|
|
601
610
|
*
|
package/src/createFabricMap.tsx
CHANGED
|
@@ -10,9 +10,15 @@ import type {
|
|
|
10
10
|
import NativeAirMapsModule, {
|
|
11
11
|
type MapBoundaries,
|
|
12
12
|
} from './specs/NativeAirMapsModule';
|
|
13
|
-
import
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
import FabricMapView, {
|
|
14
|
+
Commands as FabricCommands,
|
|
15
|
+
type MapFabricNativeProps,
|
|
16
|
+
} from './specs/NativeComponentMapView';
|
|
17
|
+
import GoogleMapView, {
|
|
18
|
+
Commands as GoogleCommands,
|
|
19
|
+
type MapFabricNativeProps as GoogleMapFabricNativeProps,
|
|
20
|
+
} from './specs/NativeComponentGoogleMapView';
|
|
21
|
+
export type MapViewProps = MapFabricNativeProps | GoogleMapFabricNativeProps;
|
|
16
22
|
|
|
17
23
|
export interface FabricMapHandle {
|
|
18
24
|
getCamera: () => Promise<Camera>;
|
|
@@ -42,231 +48,208 @@ export interface FabricMapHandle {
|
|
|
42
48
|
setIndoorActiveLevelIndex: (activeLevelIndex: number) => void;
|
|
43
49
|
}
|
|
44
50
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
return null;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
const createFabricMap = (ViewComponent: React.ComponentType, Commands: any) => {
|
|
59
|
-
return forwardRef<FabricMapHandle | null, FabricMapViewProps>(
|
|
60
|
-
(props, ref) => {
|
|
61
|
-
const fabricRef = useRef<React.ComponentRef<typeof ViewComponent>>(null);
|
|
51
|
+
const createFabricMap = (
|
|
52
|
+
ViewComponent: typeof GoogleMapView | typeof FabricMapView,
|
|
53
|
+
Commands: typeof FabricCommands | typeof GoogleCommands,
|
|
54
|
+
) => {
|
|
55
|
+
return forwardRef<FabricMapHandle | null, MapViewProps>((props, ref) => {
|
|
56
|
+
const fabricRef =
|
|
57
|
+
useRef<React.ElementRef<typeof GoogleMapView | typeof FabricMapView>>(
|
|
58
|
+
null,
|
|
59
|
+
);
|
|
60
|
+
const node = findNodeHandle(fabricRef.current) ?? -1;
|
|
62
61
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
62
|
+
useImperativeHandle(ref, () => ({
|
|
63
|
+
async getMarkersFrames(onlyVisible: boolean) {
|
|
64
|
+
if (fabricRef.current) {
|
|
65
|
+
return NativeAirMapsModule.getMarkersFrames(node, onlyVisible);
|
|
66
|
+
} else {
|
|
67
|
+
throw new Error(
|
|
68
|
+
'getMarkersFrames is only supported on iOS with Fabric.',
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
async getCoordinateForPoint(point: Point) {
|
|
73
|
+
if (fabricRef.current) {
|
|
74
|
+
return NativeAirMapsModule.getCoordinateForPoint(node, point);
|
|
75
|
+
} else {
|
|
76
|
+
throw new Error(
|
|
77
|
+
'getCoordinateForPoint is only supported on iOS with Fabric.',
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
async getPointForCoordinate(coordinate: LatLng) {
|
|
82
|
+
if (fabricRef.current) {
|
|
83
|
+
return NativeAirMapsModule.getPointForCoordinate(node, coordinate);
|
|
84
|
+
} else {
|
|
85
|
+
throw new Error(
|
|
86
|
+
'getPointForCoordinate is not supported on this platform.',
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
async getAddressFromCoordinates(coordinate: LatLng) {
|
|
91
|
+
if (fabricRef.current) {
|
|
92
|
+
return NativeAirMapsModule.getAddressFromCoordinates(
|
|
93
|
+
node,
|
|
94
|
+
coordinate,
|
|
95
|
+
);
|
|
96
|
+
} else {
|
|
97
|
+
throw new Error(
|
|
98
|
+
'getAddressFromCoordinates is not supported on this platform',
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
async takeSnapshot(config: SnapshotOptions) {
|
|
103
|
+
if (fabricRef.current) {
|
|
104
|
+
return NativeAirMapsModule.takeSnapshot(node, JSON.stringify(config));
|
|
105
|
+
} else {
|
|
106
|
+
throw new Error('takeSnapshot is only supported on iOS with Fabric.');
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
async getCamera() {
|
|
110
|
+
if (fabricRef.current) {
|
|
111
|
+
return NativeAirMapsModule.getCamera(node);
|
|
112
|
+
} else {
|
|
113
|
+
throw new Error('getCamera is only supported on iOS with Fabric.');
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
async getMapBoundaries() {
|
|
117
|
+
if (fabricRef.current) {
|
|
118
|
+
return NativeAirMapsModule.getMapBoundaries(node);
|
|
119
|
+
} else {
|
|
120
|
+
throw new Error(
|
|
121
|
+
'getMapBoundaries is only supported on iOS with Fabric.',
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
animateToRegion(region: Region, duration: number) {
|
|
126
|
+
if (fabricRef.current) {
|
|
127
|
+
try {
|
|
128
|
+
(Commands as any).animateToRegion(
|
|
129
|
+
fabricRef.current,
|
|
130
|
+
JSON.stringify(region),
|
|
131
|
+
duration,
|
|
132
|
+
);
|
|
133
|
+
} catch (error) {
|
|
134
|
+
throw new Error('Failed to animateToRegion');
|
|
110
135
|
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
getNodeHandle(fabricRef.current) ?? -1,
|
|
128
|
-
);
|
|
129
|
-
} else {
|
|
130
|
-
throw new Error('getCamera is only supported on iOS with Fabric.');
|
|
131
|
-
}
|
|
132
|
-
},
|
|
133
|
-
async getMapBoundaries() {
|
|
134
|
-
if (fabricRef.current) {
|
|
135
|
-
return NativeAirMapsModule.getMapBoundaries(
|
|
136
|
-
getNodeHandle(fabricRef.current) ?? -1,
|
|
137
|
-
);
|
|
138
|
-
} else {
|
|
139
|
-
throw new Error(
|
|
140
|
-
'getMapBoundaries is only supported on iOS with Fabric.',
|
|
141
|
-
);
|
|
136
|
+
} else {
|
|
137
|
+
throw new Error(
|
|
138
|
+
'animateToRegion is only supported on iOS with Fabric.',
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
fitToElements(edgePadding: EdgePadding, animated: boolean) {
|
|
143
|
+
if (fabricRef.current) {
|
|
144
|
+
try {
|
|
145
|
+
(Commands as any).fitToElements(
|
|
146
|
+
fabricRef.current,
|
|
147
|
+
JSON.stringify(edgePadding),
|
|
148
|
+
animated,
|
|
149
|
+
);
|
|
150
|
+
} catch (error) {
|
|
151
|
+
throw new Error('Failed to fitToElements');
|
|
142
152
|
}
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
Commands.fitToElements(
|
|
165
|
-
fabricRef.current,
|
|
166
|
-
JSON.stringify(edgePadding),
|
|
167
|
-
animated,
|
|
168
|
-
);
|
|
169
|
-
} catch (error) {
|
|
170
|
-
throw new Error('Failed to fitToElements');
|
|
171
|
-
}
|
|
172
|
-
} else {
|
|
173
|
-
throw new Error(
|
|
174
|
-
'fitToElements is only supported on iOS with Fabric.',
|
|
175
|
-
);
|
|
153
|
+
} else {
|
|
154
|
+
throw new Error(
|
|
155
|
+
'fitToElements is only supported on iOS with Fabric.',
|
|
156
|
+
);
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
fitToSuppliedMarkers(
|
|
160
|
+
markers: string[],
|
|
161
|
+
edgePadding: EdgePadding,
|
|
162
|
+
animated: boolean,
|
|
163
|
+
) {
|
|
164
|
+
if (fabricRef.current) {
|
|
165
|
+
try {
|
|
166
|
+
(Commands as any).fitToSuppliedMarkers(
|
|
167
|
+
fabricRef.current,
|
|
168
|
+
JSON.stringify(markers),
|
|
169
|
+
JSON.stringify(edgePadding),
|
|
170
|
+
animated,
|
|
171
|
+
);
|
|
172
|
+
} catch (error) {
|
|
173
|
+
throw new Error('Failed to fitToSuppliedMarkers');
|
|
176
174
|
}
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
}
|
|
194
|
-
} else {
|
|
195
|
-
throw new Error(
|
|
196
|
-
'fitToSuppliedMarkers is only supported on iOS with Fabric.',
|
|
197
|
-
);
|
|
175
|
+
} else {
|
|
176
|
+
throw new Error(
|
|
177
|
+
'fitToSuppliedMarkers is only supported on iOS with Fabric.',
|
|
178
|
+
);
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
animateCamera(camera: Partial<Camera>, duration: number) {
|
|
182
|
+
if (fabricRef.current) {
|
|
183
|
+
try {
|
|
184
|
+
(Commands as any).animateCamera(
|
|
185
|
+
fabricRef.current,
|
|
186
|
+
JSON.stringify(camera),
|
|
187
|
+
duration,
|
|
188
|
+
);
|
|
189
|
+
} catch (error) {
|
|
190
|
+
throw new Error('Failed to animateCamera');
|
|
198
191
|
}
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
animated: boolean,
|
|
221
|
-
) {
|
|
222
|
-
if (fabricRef.current) {
|
|
223
|
-
try {
|
|
224
|
-
Commands.fitToCoordinates(
|
|
225
|
-
fabricRef.current,
|
|
226
|
-
JSON.stringify(coordinates),
|
|
227
|
-
JSON.stringify(edgePadding),
|
|
228
|
-
animated,
|
|
229
|
-
);
|
|
230
|
-
} catch (error) {
|
|
231
|
-
throw new Error('Failed to fitToCoordinates');
|
|
232
|
-
}
|
|
233
|
-
} else {
|
|
234
|
-
throw new Error(
|
|
235
|
-
'fitToCoordinates is only supported on iOS with Fabric.',
|
|
236
|
-
);
|
|
192
|
+
} else {
|
|
193
|
+
throw new Error(
|
|
194
|
+
'animateCamera is only supported on iOS with Fabric.',
|
|
195
|
+
);
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
fitToCoordinates(
|
|
199
|
+
coordinates: LatLng[],
|
|
200
|
+
edgePadding: EdgePadding,
|
|
201
|
+
animated: boolean,
|
|
202
|
+
) {
|
|
203
|
+
if (fabricRef.current) {
|
|
204
|
+
try {
|
|
205
|
+
(Commands as any).fitToCoordinates(
|
|
206
|
+
fabricRef.current,
|
|
207
|
+
JSON.stringify(coordinates),
|
|
208
|
+
JSON.stringify(edgePadding),
|
|
209
|
+
animated,
|
|
210
|
+
);
|
|
211
|
+
} catch (error) {
|
|
212
|
+
throw new Error('Failed to fitToCoordinates');
|
|
237
213
|
}
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
214
|
+
} else {
|
|
215
|
+
throw new Error(
|
|
216
|
+
'fitToCoordinates is only supported on iOS with Fabric.',
|
|
217
|
+
);
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
setIndoorActiveLevelIndex(activeLevelIndex: number) {
|
|
221
|
+
if (fabricRef.current) {
|
|
222
|
+
try {
|
|
223
|
+
(Commands as any).setIndoorActiveLevelIndex(
|
|
224
|
+
fabricRef.current,
|
|
225
|
+
activeLevelIndex,
|
|
226
|
+
);
|
|
227
|
+
} catch (error) {
|
|
228
|
+
console.error('Failed to set camera:', error);
|
|
251
229
|
}
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
230
|
+
} else {
|
|
231
|
+
console.warn('setIndoorActiveLevelIndex is not supported.');
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
setCamera(camera: Partial<Camera>) {
|
|
235
|
+
if (fabricRef.current) {
|
|
236
|
+
try {
|
|
237
|
+
(Commands as any).setCamera(
|
|
238
|
+
fabricRef.current,
|
|
239
|
+
JSON.stringify(camera),
|
|
240
|
+
);
|
|
241
|
+
} catch (error) {
|
|
242
|
+
console.error('Failed to set camera:', error);
|
|
262
243
|
}
|
|
263
|
-
}
|
|
264
|
-
|
|
244
|
+
} else {
|
|
245
|
+
console.warn('setCamera is not supported');
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
}));
|
|
265
249
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
);
|
|
250
|
+
// @ts-ignore
|
|
251
|
+
return <ViewComponent {...props} ref={fabricRef} />;
|
|
252
|
+
});
|
|
270
253
|
};
|
|
271
254
|
|
|
272
255
|
export default createFabricMap;
|
|
@@ -11,6 +11,7 @@ import type {
|
|
|
11
11
|
DirectEventHandler,
|
|
12
12
|
BubblingEventHandler,
|
|
13
13
|
} from 'react-native/Libraries/Types/CodegenTypes';
|
|
14
|
+
import GoogleMapView from './NativeComponentGoogleMapView';
|
|
14
15
|
|
|
15
16
|
export type EdgePadding = Readonly<{
|
|
16
17
|
top: Double; // Non-nullable Double for top
|
|
@@ -860,45 +861,45 @@ export interface MapFabricNativeProps extends ViewProps {
|
|
|
860
861
|
zoomTapEnabled?: WithDefault<boolean, true>;
|
|
861
862
|
}
|
|
862
863
|
|
|
863
|
-
|
|
864
|
+
interface NativeCommands {
|
|
864
865
|
animateToRegion: (
|
|
865
|
-
viewRef: React.ElementRef<
|
|
866
|
+
viewRef: React.ElementRef<typeof GoogleMapView>,
|
|
866
867
|
regionJSON: string,
|
|
867
868
|
duration: Int32,
|
|
868
869
|
) => void;
|
|
869
870
|
|
|
870
871
|
setCamera: (
|
|
871
|
-
viewRef: React.ElementRef<
|
|
872
|
+
viewRef: React.ElementRef<typeof GoogleMapView>,
|
|
872
873
|
cameraJSON: string,
|
|
873
874
|
) => void;
|
|
874
875
|
|
|
875
876
|
animateCamera: (
|
|
876
|
-
viewRef: React.ElementRef<
|
|
877
|
+
viewRef: React.ElementRef<typeof GoogleMapView>,
|
|
877
878
|
cameraJSON: string,
|
|
878
879
|
duration: Int32,
|
|
879
880
|
) => void;
|
|
880
881
|
|
|
881
882
|
fitToElements: (
|
|
882
|
-
viewRef: React.ElementRef<
|
|
883
|
+
viewRef: React.ElementRef<typeof GoogleMapView>,
|
|
883
884
|
edgePaddingJSON: string,
|
|
884
885
|
animated: boolean,
|
|
885
886
|
) => void;
|
|
886
887
|
|
|
887
888
|
fitToSuppliedMarkers: (
|
|
888
|
-
viewRef: React.ElementRef<
|
|
889
|
+
viewRef: React.ElementRef<typeof GoogleMapView>,
|
|
889
890
|
markersJSON: string,
|
|
890
891
|
edgePaddingJSON: string,
|
|
891
892
|
animated: boolean,
|
|
892
893
|
) => void;
|
|
893
894
|
|
|
894
895
|
fitToCoordinates: (
|
|
895
|
-
viewRef: React.ElementRef<
|
|
896
|
+
viewRef: React.ElementRef<typeof GoogleMapView>,
|
|
896
897
|
coordinatesJSON: string,
|
|
897
898
|
edgePaddingJSON: string,
|
|
898
899
|
animated: boolean,
|
|
899
900
|
) => void;
|
|
900
901
|
setIndoorActiveLevelIndex: (
|
|
901
|
-
viewRef: React.ElementRef<
|
|
902
|
+
viewRef: React.ElementRef<typeof GoogleMapView>,
|
|
902
903
|
activeLevelIndex: Int32,
|
|
903
904
|
) => void;
|
|
904
905
|
}
|
|
@@ -11,6 +11,7 @@ import type {
|
|
|
11
11
|
DirectEventHandler,
|
|
12
12
|
BubblingEventHandler,
|
|
13
13
|
} from 'react-native/Libraries/Types/CodegenTypes';
|
|
14
|
+
import FabricMapView from './NativeComponentMapView';
|
|
14
15
|
|
|
15
16
|
export type EdgePadding = Readonly<{
|
|
16
17
|
top: Double; // Non-nullable Double for top
|
|
@@ -1039,46 +1040,46 @@ export interface MapFabricNativeProps extends ViewProps {
|
|
|
1039
1040
|
cameraZoomRange?: CameraZoomRange;
|
|
1040
1041
|
}
|
|
1041
1042
|
|
|
1042
|
-
|
|
1043
|
+
interface NativeCommands {
|
|
1043
1044
|
animateToRegion: (
|
|
1044
|
-
viewRef: React.ElementRef<
|
|
1045
|
+
viewRef: React.ElementRef<typeof FabricMapView>,
|
|
1045
1046
|
regionJSON: string,
|
|
1046
1047
|
duration: Int32,
|
|
1047
1048
|
) => void;
|
|
1048
1049
|
|
|
1049
1050
|
setCamera: (
|
|
1050
|
-
viewRef: React.ElementRef<
|
|
1051
|
+
viewRef: React.ElementRef<typeof FabricMapView>,
|
|
1051
1052
|
cameraJSON: string,
|
|
1052
1053
|
) => void;
|
|
1053
1054
|
|
|
1054
1055
|
animateCamera: (
|
|
1055
|
-
viewRef: React.ElementRef<
|
|
1056
|
+
viewRef: React.ElementRef<typeof FabricMapView>,
|
|
1056
1057
|
cameraJSON: string,
|
|
1057
1058
|
duration: Int32,
|
|
1058
1059
|
) => void;
|
|
1059
1060
|
|
|
1060
1061
|
fitToElements: (
|
|
1061
|
-
viewRef: React.ElementRef<
|
|
1062
|
+
viewRef: React.ElementRef<typeof FabricMapView>,
|
|
1062
1063
|
edgePaddingJSON: string,
|
|
1063
1064
|
animated: boolean,
|
|
1064
1065
|
) => void;
|
|
1065
1066
|
|
|
1066
1067
|
fitToSuppliedMarkers: (
|
|
1067
|
-
viewRef: React.ElementRef<
|
|
1068
|
+
viewRef: React.ElementRef<typeof FabricMapView>,
|
|
1068
1069
|
markersJSON: string,
|
|
1069
1070
|
edgePaddingJSON: string,
|
|
1070
1071
|
animated: boolean,
|
|
1071
1072
|
) => void;
|
|
1072
1073
|
|
|
1073
1074
|
fitToCoordinates: (
|
|
1074
|
-
viewRef: React.ElementRef<
|
|
1075
|
+
viewRef: React.ElementRef<typeof FabricMapView>,
|
|
1075
1076
|
coordinatesJSON: string,
|
|
1076
1077
|
edgePaddingJSON: string,
|
|
1077
1078
|
animated: boolean,
|
|
1078
1079
|
) => void;
|
|
1079
1080
|
|
|
1080
1081
|
setIndoorActiveLevelIndex: (
|
|
1081
|
-
viewRef: React.ElementRef<
|
|
1082
|
+
viewRef: React.ElementRef<typeof FabricMapView>,
|
|
1082
1083
|
activeLevelIndex: Int32,
|
|
1083
1084
|
) => void;
|
|
1084
1085
|
}
|