feat: sync all markers across clients in MapLibre example #9

Merged
ryan merged 1 commits from worktree-marker-sync into main 2026-02-20 20:16:17 +00:00
Owner

Convert the three interactive markers (yellow click, purple vehicle, blue draggable pin) from per-client state to cross-client sync:

  • Yellow click marker: PubSub broadcast on map click, all clients subscribe and update signal-backed marker position
  • Purple vehicle marker: single shared goroutine (sync.Once + RWMutex) replaces per-client random movement so all clients see identical path
  • Blue draggable pin: extra hidden input triggers server action on dragend, which publishes new position via PubSub to all clients
Convert the three interactive markers (yellow click, purple vehicle, blue draggable pin) from per-client state to cross-client sync: - **Yellow click marker**: PubSub broadcast on map click, all clients subscribe and update signal-backed marker position - **Purple vehicle marker**: single shared goroutine (`sync.Once` + `RWMutex`) replaces per-client random movement so all clients see identical path - **Blue draggable pin**: extra hidden input triggers server action on dragend, which publishes new position via PubSub to all clients
ryan added 1 commit 2026-02-20 20:15:38 +00:00
feat: sync all markers across clients in MapLibre example
All checks were successful
CI / Build and Test (push) Successful in 34s
CI / Build and Test (pull_request) Successful in 33s
da2d7d8983
Convert the three interactive markers (yellow click, purple vehicle,
blue draggable pin) from per-client state to cross-client sync:

- Yellow click marker: PubSub broadcast on map click, all clients
  subscribe and update signal-backed marker position
- Purple vehicle marker: single shared goroutine (sync.Once + RWMutex)
  replaces per-client random movement so all clients see identical path
- Blue draggable pin: extra hidden input triggers server action on
  dragend, which publishes new position via PubSub to all clients
ryan merged commit cbc5022e0d into main 2026-02-20 20:16:17 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ryan/via#9