Guest User

Untitled

a guest
Oct 18th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. class Bike extends Component {
  2.  
  3. handleGetDirections = () => {
  4. const data = {
  5. source: {
  6. latitude: -33.8356372,
  7. longitude: 18.6947617
  8. },
  9. destination: {
  10. latitude: -33.8600024,
  11. longitude: 18.697459
  12. },
  13. params: [
  14. {
  15. key: "dirflg",
  16. value: "w"
  17. }
  18. ]
  19. }
  20.  
  21. getDirections(data)
  22. }
  23. render() {
  24. const { coordinate, title } = this.props;
  25.  
  26. return (
  27. <MapView.Marker coordinate={coordinate}>
  28.  
  29. <MapView.Callout onPress={this.handleGetDirections}>
  30. <View>
  31. <Text>{ title }</Text>
  32. <GmapsDirections/>
  33.  
  34. </View>
  35. </MapView.Callout>
  36. </MapView.Marker>
  37. )
  38. }
  39. }
Add Comment
Please, Sign In to add comment