drawMultipleRoad method
Future<List<RoadInfo> >
drawMultipleRoad(
- List<
MultiRoadConfiguration> configs, { - MultiRoadOption commonRoadOption = const MultiRoadOption.empty(),
inherited
Implementation
Future<List<RoadInfo>> drawMultipleRoad(
List<MultiRoadConfiguration> configs, {
MultiRoadOption commonRoadOption = const MultiRoadOption.empty(),
}) async {
List<Future<RoadInfo>> futureRoads = [];
configs.forEach((config) {
futureRoads.add(
drawRoad(
config.startPoint,
config.destinationPoint,
interestPoints: config.intersectPoints,
roadOption: config.roadOptionConfiguration ?? commonRoadOption,
),
);
});
final infos = await Future.wait(futureRoads);
infos.forEach((roadInfo) {
roadsWebCache[roadInfo.key] = roadInfo;
});
return infos;
}