screenOffsetToLatLng method
Calculate the LatLng coordinates for a offset
.
Implementation
LatLng screenOffsetToLatLng(Offset offset) {
final localPointCenterDistance =
nonRotatedSize.center(Offset.zero) - offset;
final mapCenter = crs.latLngToOffset(center, zoom);
var point = mapCenter - localPointCenterDistance;
if (rotation != 0.0) {
point = rotatePoint(mapCenter, point);
}
return crs.offsetToLatLng(point, zoom);
}