toLatLng method

  1. @override
Future<LatLng> toLatLng(
  1. Point<num> screenLocation
)
override

Implementation

@override
Future<LatLng> toLatLng(Point screenLocation) async {
  try {
    var latLngMap =
        await _channel.invokeMethod('map#toLatLng', <String, dynamic>{
      'x': screenLocation.x,
      'y': screenLocation.y,
    });
    return LatLng(latLngMap['latitude'], latLngMap['longitude']);
  } on PlatformException catch (e) {
    return new Future.error(e);
  }
}