offsetToCrs method

LatLng offsetToCrs(
  1. Offset offset, [
  2. double? zoom
])

Implementation

LatLng offsetToCrs(Offset offset, [double? zoom]) {
  final focalStartPt = project(center, zoom ?? this.zoom);
  final point =
      (offset.toPoint() - (nonRotatedSize / 2.0)).rotate(rotationRad);

  final newCenterPt = focalStartPt + point;
  return unproject(newCenterPt, zoom ?? this.zoom);
}