npm react native turn by turn navigation
import { OpenMapDirections } from 'react-native-navigation-directions';
export default class App extends React.Component {
_callShowDirections = () => {
const startPoint = {
longitude: -8.945406,
latitude: 38.575078
}
const endPoint = {
longitude: -8.9454275,
latitude: 38.5722429
}
const transportPlan = 'w';
OpenMapDirections(startPoint, endPoint, transportPlan).then(res => {
console.log(res)
});
}
render() {
return (
<View style={styles.container}>
<Text>Show direction between two random points!</Text>
<Button
onPress={() => { this._callShowDirections() }}
title="Open map"
color="#841584"
/>
</View>
);
}
}
Also in JavaScript:
- js redirect to url
- using multiparty with node js express
- expo login using facebook error after login react native
- javascript map function
- jquery cancel ajax request on click
- Expected an assignment or function call and instead saw an expression
- nodejs fs delete non empty directory
- how to floor a number in javascript
- angularjs find and update object in array
- promise catch
- javascript get sub array
- return an array of strings from an array of objects js
- how to create a smooth effect in javasript
- javascript genreate number id
- react chunk file too large
- how to check if map is map javascript
- npm create react app
- js remove form object by key
- document queryselectorall and map javacript
- puppeteer block request javascript
- if in javascript
- tappify react
- add discord.js library
- v-btn click