Skip to main content

drawPolyline

Future<void> drawPolyline ({required List<Map<String, dynamic>> coordinates, Map<String, dynamic>? polylineOptions, DrawPolylineCallback? drawPolylineCallback})

Draw a polyline.

Implementation

Future<void> drawPolyline({
required List<Map<String, dynamic>> coordinates,
Map<String, dynamic>? polylineOptions, DrawPolylineCallback? drawPolylineCallback}) async {
try{
final String polylineID = await _channel.invokeMethod('drawPolyline', {"coordinates": coordinates, "polylineOptions": polylineOptions});
drawPolylineCallback!(polylineID);
print("Result from native: $polylineID");
} on PlatformException catch (e) {
print("Error from native: $e.message");
}
}