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

1 Commits

Author SHA1 Message Date
Ryan Hamamura
da2d7d8983 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
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
2026-02-20 10:13:43 -10:00