You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The API of this Map has been built with the intention of it being able to utilize the [Animated API](https://facebook.github.io/react-native/docs/animated.html).
270
-
271
-
In order to get this to work, you will need to modify the `AnimatedImplementation.js` file in the
272
-
source of react-native with [this one](https://gist.github.com/lelandrichardson/c0d938e02301f9294465).
273
-
274
-
Ideally this will be possible in the near future without this modification.
275
-
276
266
### Animated Region
277
267
278
-
The MapView can accept an `Animated.Region` value as its `region` prop. This allows you to utilize
279
-
the Animated API to control the map's center and zoom.
268
+
The MapView can accept an `MapView.AnimatedRegion` value as its `region` prop. This allows you to utilize the Animated API to control the map's center and zoom.
280
269
281
270
```jsx
271
+
importMapViewfrom'react-native-maps';
272
+
282
273
getInitialState() {
283
274
return {
284
-
region:newAnimated.Region({
275
+
region:newMapView.AnimatedRegion({
285
276
latitude:LATITUDE,
286
277
longitude:LONGITUDE,
287
278
latitudeDelta:LATITUDE_DELTA,
@@ -306,18 +297,27 @@ render() {
306
297
307
298
### Animated Marker Position
308
299
309
-
Markers can also accept an `Animated.Region` value as a coordinate.
300
+
Markers can also accept an `AnimatedRegion` value as a coordinate.
310
301
311
302
```jsx
312
303
getInitialState() {
313
304
return {
314
-
coordinate:newAnimated.Region({
305
+
coordinate:newMapView.AnimatedRegion({
315
306
latitude:LATITUDE,
316
307
longitude:LONGITUDE,
317
308
}),
318
309
};
319
310
}
320
311
312
+
componentWillReceiveProps(nextProps) {
313
+
if (this.props.coordinate!==nextProps.coordinate) {
0 commit comments