0.20.2 • Published 6 years ago

react-native-maps-with-navigation v0.20.2

Weekly downloads
16
License
-
Repository
github
Last release
6 years ago

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-navigation

How to use the method

this.refs.map.animateToNavigation(location, bearing, angle, duration?);

ArgumentTypeDescription
location{ latitude: number, longitude: number }The lat/lon location to animate the map
beringnumberThe amount of rotation in degrees to rotate the map
anglenumberThe amount of inclination in degrees to incline the map
duration?numberThe 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