0.20.2 • Published 8 years ago
react-native-maps-with-navigation v0.20.2
animateToNavigation for react-native-maps
This is a fork of react-native-maps v0.20.1 with a new method for components called animateToNavigation.
Installation
$ npm install --save react-native-maps-with-navigationHow to use the method
this.refs.map.animateToNavigation(location, bearing, angle, duration?);
| Argument | Type | Description | 
|---|---|---|
| location | { latitude: number, longitude: number } | The lat/lon location to animate the map | 
| bering | number | The amount of rotation in degrees to rotate the map | 
| angle | number | The amount of inclination in degrees to incline the map | 
| duration? | number | The duration of the animation in milliseconds (defaults to 500) | 
IMPORTANT NOTE:
When using this package you may want to change "react-native-maps" with "react-native-maps-with-navigation" at the configuration proccess. The same is valid for packages implementing react-native-maps such as react-native-maps-directions.
Use with react-native-maps-directions
at ../node_modules/react-native-maps-directions/src/MapViewDirections.js change line 3 from:
import MapView from 'react-native-maps';to:
import MapView from 'react-native-maps-with-navigation';You are done and ready to go!
Further Documentation
For further documentation please refer to the original react-native-maps repo at https://github.com/react-community/react-native-maps
License
MIT