drawRoad method
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
.
- to delete the road use RoadInfo.key
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,
);
}