getVisibleRegion method
Implementation
@override
Future<LatLngBounds> getVisibleRegion() async {
try {
final Map<dynamic, dynamic> reply =
await _channel.invokeMethod('map#getVisibleRegion');
final southwest = reply['sw'] as List<dynamic>;
final northeast = reply['ne'] as List<dynamic>;
return LatLngBounds(
southwest: LatLng(southwest[0], southwest[1]),
northeast: LatLng(northeast[0], northeast[1]),
);
} on PlatformException catch (e) {
return Future.error(e);
}
}