drawMultipleRoad method

Future<List<RoadInfo>> drawMultipleRoad(
  1. List<MultiRoadConfiguration> configs, {
  2. MultiRoadOption commonRoadOption = const MultiRoadOption.empty(),
})
inherited

Implementation

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