drawRoad method

Future<RoadInfo> drawRoad(
  1. GeoPoint start,
  2. GeoPoint end, {
  3. RoadType roadType = RoadType.car,
  4. List<GeoPoint>? intersectPoint,
  5. RoadOption? roadOption,
})

draw road

this method show route from 2 point and pass throught interesect points in the map,

you can configure your road in runtime with roadOption, and change the road type drawn by modify the routeType.

return RoadInfo that contain road information such as distance,duration, list of geopoints

start : started point of your Road

end : last point of your road

intersectPoint : (List of GeoPoint) middle position that you want you road to pass through it

roadOption : (RoadOption) runtime configuration of the road

Implementation

Future<RoadInfo> drawRoad(
  GeoPoint start,
  GeoPoint end, {
  RoadType roadType = RoadType.car,
  List<GeoPoint>? intersectPoint,
  RoadOption? roadOption,
}) async {
  return await osmBaseController.drawRoad(
    start,
    end,
    roadType: roadType,
    interestPoints: intersectPoint,
    roadOption: roadOption,
  );
}