unprojectXY method

  1. @override
LatLng unprojectXY(
  1. double x,
  2. double y
)
override

unproject cartesian x,y coordinates to LatLng.

Implementation

@override
LatLng unprojectXY(double x, double y) {
  const d = 180 / math.pi;
  return LatLng(
    _inclusiveLat((2 * math.atan(math.exp(y / r)) - (math.pi / 2)) * d),
    _inclusiveLng(x * d / r),
  );
}