-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathNavigationView.js
More file actions
38 lines (34 loc) · 796 Bytes
/
NavigationView.js
File metadata and controls
38 lines (34 loc) · 796 Bytes
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
33
34
35
36
37
38
import React, { Component } from "react";
import PropTypes from "prop-types";
import { requireNativeComponent } from "react-native";
type Props = {
origin: {
lat: number,
long: number
},
destination: {
lat: number,
long: number
},
style?: Object
};
const MapboxNavigationView = requireNativeComponent(
"MapboxNavigationView",
NavigationView
);
export default class NavigationView extends Component<any, Props, any> {
render() {
debugger;
return <MapboxNavigationView style={this.props.style} {...this.props} />;
}
}
NavigationView.propTypes = {
origin: PropTypes.shape({
lat: PropTypes.number,
long: PropTypes.number
}).isRequired,
destination: PropTypes.shape({
lat: PropTypes.number,
long: PropTypes.number
}).isRequired
};