Currently the Road.fromOSRMJson() function assumes that the geometry fields of responses is always present, and so throws an error when the overview parameter is set to none in the OSRMManager.getRoad() or OSRMManager.getTrip() functions.
This fix is just to do a null check before trying to set the polyline member variable.
Also added some unit tests to verify the correct functionality, and updated dependencies to get the unit tests running again, http_mock_adapter was throwing an error.
Currently the
Road.fromOSRMJson()
function assumes that thegeometry
fields of responses is always present, and so throws an error when the overview parameter is set to none in theOSRMManager.getRoad()
orOSRMManager.getTrip()
functions. This fix is just to do a null check before trying to set thepolyline
member variable. Also added some unit tests to verify the correct functionality, and updated dependencies to get the unit tests running again,http_mock_adapter
was throwing an error.