drawRoadManually method

Future<String> drawRoadManually(
  1. String roadKey,
  2. List<GeoPoint> path,
  3. RoadOption roadOption
)
inherited

Implementation

Future<String> drawRoadManually(
  String roadKey,
  List<GeoPoint> path,
  RoadOption roadOption,
) async {
  final routeJs = path.toListGeoPointJs();

  interop.drawRoad(
    mapIdMixin,
    roadKey,
    routeJs,
    roadOption.roadColor.toHexColor(),
    roadOption.roadWidth.toDouble(),
    roadOption.zoomInto,
    (roadOption.roadBorderColor ?? Colors.green).toHexColor(),
    roadOption.roadBorderWidth.toDouble(),
    [],
    null,
  );

  roadsWebCache[roadKey] = RoadInfo(route: path).copyWith(
    roadKey: roadKey,
  );
  return roadKey;
}