fix: stop syncing gesture positions back to mapProvider #2

Merged
sander merged 1 commit from claude/relaxed-wright into main 2026-04-04 14:16:36 +00:00
Owner

Removed the updateCamera() call from onPositionChanged. Previously,
every gesture-driven pan/zoom frame updated the provider state, which
triggered ref.listen to call _mapController.move() redundantly.
This caused flutter_map's TileLayer to cancel in-flight tile loads
on every frame — producing partially-rendered maps and crashes when
zooming out during tile loading.

The ref.listen now only fires for programmatic changes (locateUser,
zoomIn/zoomOut), which are infrequent single-shot moves.

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

Removed the updateCamera() call from onPositionChanged. Previously, every gesture-driven pan/zoom frame updated the provider state, which triggered ref.listen to call _mapController.move() redundantly. This caused flutter_map's TileLayer to cancel in-flight tile loads on every frame — producing partially-rendered maps and crashes when zooming out during tile loading. The ref.listen now only fires for programmatic changes (locateUser, zoomIn/zoomOut), which are infrequent single-shot moves. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
sander added 1 commit 2026-04-04 14:16:28 +00:00
Removed the updateCamera() call from onPositionChanged. Previously,
every gesture-driven pan/zoom frame updated the provider state, which
triggered ref.listen to call _mapController.move() redundantly.
This caused flutter_map's TileLayer to cancel in-flight tile loads
on every frame — producing partially-rendered maps and crashes when
zooming out during tile loading.

The ref.listen now only fires for programmatic changes (locateUser,
zoomIn/zoomOut), which are infrequent single-shot moves.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
sander merged commit 8b53075a92 into main 2026-04-04 14:16:36 +00:00
sander deleted branch claude/relaxed-wright 2026-04-04 14:16:39 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: sander/maps#2
No description provided.