Skip to content

Commit

Permalink
Fix zoom breaking pointToLatLng()
Browse files Browse the repository at this point in the history
  • Loading branch information
HugoHeneault committed Jan 12, 2022
1 parent 5091e19 commit a8bd579
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/src/map/map.dart
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,12 @@ class MapControllerImpl implements MapController {

@override
LatLng? pointToLatLng(CustomPoint localPoint) {
final width = _state.size.x;
final height = _state.size.y;
if (_state.originalSize == null) {
return null;
}

final width = _state.originalSize!.x;
final height = _state.originalSize!.y;

var localPointCenterDistance =
CustomPoint((width / 2) - localPoint.x, (height / 2) - localPoint.y);
Expand Down

0 comments on commit a8bd579

Please sign in to comment.