Currently, if we're trying to reuse RouteOptions object for creating route requests we constantly need to switch Object impl -> String representation -> Object impl and repeat the other way around.
An example can be the Directions request's bearings field:
- The user needs to pass
bearings in a String format in the Nav SDK to make a request.
- We're parsing this
String into objects inside of the SDK to match MapboxDirections' addBearing(Double angle, Double tolerance).
MapboxDirections parses it back to String to make a request.
We should cut that middle conversion. We can possibly do it by moving all of the utility methods based on objects to RouteOptions.
/cc @mapbox/navigation-android
Currently, if we're trying to reuse
RouteOptionsobject for creating route requests we constantly need to switch Object impl -> String representation -> Object impl and repeat the other way around.An example can be the Directions request's
bearingsfield:bearingsin aStringformat in the Nav SDK to make a request.Stringinto objects inside of the SDK to matchMapboxDirections'addBearing(Double angle, Double tolerance).MapboxDirectionsparses it back toStringto make a request.We should cut that middle conversion. We can possibly do it by moving all of the utility methods based on objects to
RouteOptions./cc @mapbox/navigation-android