react-native-mapbox-navigation icon indicating copy to clipboard operation
react-native-mapbox-navigation copied to clipboard

Custom directions API url

Open vlkpa opened this issue 3 years ago • 2 comments

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]

vlkpa avatar Mar 11 '21 08:03 vlkpa

We really need this!

DGLcsGaming avatar Oct 01 '21 15:10 DGLcsGaming

@rossmartin Any help would be heighly appreciated!

DGLcsGaming avatar Nov 01 '21 22:11 DGLcsGaming