fix: increase action rate limit for drag updates in maplibre example
All checks were successful
CI / Build and Test (push) Successful in 36s
CI / Build and Test (pull_request) Successful in 36s

The live drag writeback fires at ~60Hz via requestAnimationFrame, but the
default context-level rate limit is 10 req/s (burst 20). This caused 429
responses and choppy cross-client sync during pin drags.

Raise the example app's ActionRateLimit to 60 req/s (burst 120) to
accommodate rAF-rate drag updates.
This commit is contained in:
Ryan Hamamura
2026-02-20 14:45:38 -10:00
parent 453618f712
commit 4b61b4d817

View File

@@ -78,10 +78,11 @@ const shipSVG = `<svg width="48" height="28" viewBox="0 0 80 44" xmlns="http://w
func main() {
v := via.New()
v.Config(via.Options{
DocumentTitle: "MapLibre GL Example",
ServerAddress: ":7331",
DevMode: true,
Plugins: []via.Plugin{maplibre.Plugin},
DocumentTitle: "MapLibre GL Example",
ServerAddress: ":7331",
DevMode: true,
Plugins: []via.Plugin{maplibre.Plugin},
ActionRateLimit: via.RateLimitConfig{Rate: 60, Burst: 120},
})
// Single goroutine moves the vehicle — all clients read the same position.