homeeondemand / react-native-mapbox-navigation

A navigation UI ready to drop into your React Native application
MIT License
154 stars 120 forks source link

Custom directions API url #24

Open vlkpa opened 3 years ago

vlkpa commented 3 years ago

Hi guys, we want to avoid of using Mapbox directions API, so we created our own directions API (with graphhopper and maphopper as proxy). Do you think that it would by possible to connect our api url to react-native-mapbox-navigation at the end? I tried to add our api url to baseUrl in MapboxNavigationView.kt for android, but RouteOptions builder creates different url format (we can create mapper for this url format in our maphopper). Do you think, that it would be possible to do same in swift? Also we want to customize vehicle type (foot, cycle...), at this point it is possible to navigate only with car as vehicle. With url prop for custom directions API url it would be possible to customize more options for directions routes (maybe?). Do you think, that it would be technically possible to create mapper for this url in react-native-mapbox-navigation? Example url from maphopper: http://localhost:3000/api/1/route?point=40.72,-74&vehicle=car&locale=en&key=[GH_ACCESSTOKEN]&points_encoded=false&point=40.733,-73.989&mapboxkey=[MB_ACCESS_TOKEN]

DGLcsGaming commented 2 years ago

We really need this!

DGLcsGaming commented 2 years ago

@rossmartin Any help would be heighly appreciated!