toScreenLocationBatch method
Implementation
@override
Future<List<Point>> toScreenLocationBatch(Iterable<LatLng> latLngs) async {
try {
final coordinates = Float64List.fromList(latLngs
.map((e) => [e.latitude, e.longitude])
.expand((e) => e)
.toList());
final Float64List result = await _channel.invokeMethod(
'map#toScreenLocationBatch', {"coordinates": coordinates});
final points = <Point>[];
for (var i = 0; i < result.length; i += 2) {
points.add(Point(result[i], result[i + 1]));
}
return points;
} on PlatformException catch (e) {
return Future.error(e);
}
}