drawRoadManually method
Future<void>
drawRoadManually(
- int idOSM,
- String roadKey,
- List<
GeoPoint> road, - RoadOption roadOption,
override
Implementation
@override
Future<void> drawRoadManually(
int idOSM,
String roadKey,
List<GeoPoint> road,
RoadOption roadOption,
) async {
final coordinates = road.map((e) => e.toListNum()).toList();
final encodedCoordinates = encodePolyline(coordinates);
Map<String, dynamic> data = {
'key': roadKey,
"road": encodedCoordinates,
"roadWidth": roadOption.roadWidth,
};
data.addAll(Map.from(roadOption.toMap()));
await _channels[idOSM]?.invokeMethod(
"drawRoad#manually",
data,
);
}