forked from nobodyabcd/react-native-mapbox-navigation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
32 lines (27 loc) · 813 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import PropTypes from 'prop-types';
import * as React from 'react';
import { requireNativeComponent, StyleSheet, View } from 'react-native';
const MapboxNavigation = (props) => {
return <RNMapboxNavigation style={styles.flex} {...props} />;
};
MapboxNavigation.propTypes = {
origin: PropTypes.array.isRequired,
destination: PropTypes.array.isRequired,
shouldSimulateRoute: PropTypes.bool,
onLocationChange: PropTypes.func,
onRouteProgressChange: PropTypes.func,
onError: PropTypes.func,
onCancelNavigation: PropTypes.func,
onArrive: PropTypes.func,
showsEndOfRouteFeedback: PropTypes.bool,
};
const RNMapboxNavigation = requireNativeComponent(
'MapboxNavigation',
MapboxNavigation
);
const styles = StyleSheet.create({
flex: {
flex: 1,
},
});
export default MapboxNavigation;