Skip to content

Commit f1d1675

Browse files
authored
fix: ensure MapController.rotateAroundPoint does not move map when already rotated (#2029)
1 parent 4dcb3d5 commit f1d1675

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/src/map/controller/map_controller_impl.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,8 @@ class MapControllerImpl extends ValueNotifier<_MapControllerState>
245245
}
246246

247247
final rotationDiff = degree - camera.rotation;
248-
final rotationCenter = (camera.projectAtZoom(camera.center) + offset!)
249-
.rotate(camera.rotationRad);
248+
final rotationCenter = camera.projectAtZoom(camera.center) +
249+
offset!.rotate(camera.rotationRad);
250250

251251
return (
252252
moveSuccess: moveRaw(

0 commit comments

Comments
 (0)