getLatLng method

Future<LatLng> getLatLng(
  1. ScreenCoordinate screenCoordinate
)

Returns the LatLng for a screenCoordinate (in pixels) of the viewport.

Implementation

Future<LatLng> getLatLng(ScreenCoordinate screenCoordinate) async {
  assert(_googleMap != null,
      'Cannot get the lat, lng of a screen coordinate with a null map.');

  final gmaps.LatLng latLng =
      _pixelToLatLng(_googleMap!, screenCoordinate.x, screenCoordinate.y);
  return _gmLatLngToLatLng(latLng);
}