Collaborative Map
View and explore a map together in real time. Sync pan and zoom with your room, drop shared pins, and chat with others.
Readme
What is a collaborative map?
A collaborative map is a shared geospatial view where multiple people can see each other's positions, actions, and annotations on the same map in real time. Unlike a static embedded map, a collaborative map is a live workspace: each participant's cursor moves across the map as they explore it, pins dropped by one user appear instantly for everyone else, and the view can optionally stay synchronized so all participants are always looking at the same area.
Real-time map collaboration is useful whenever a team needs to coordinate around geography — field surveys, logistics planning, event management, remote location walkthroughs, or just sharing a place of interest with someone on the other side of the world without a screen-share call.
Tool description
The Collaborative Map is a real-time shared map powered by Leaflet and OpenStreetMap. Share the room URL with others and you will all see a live map with each other's cursors moving across it. Drop color-coded pins to mark points of interest — they sync to every participant instantly and persist so late joiners see them too. Enable Follow mode to mirror another user's map navigation in real time, ideal for guided location walkthroughs.
Features
- Live cursor sharing with smooth movement: Each participant's cursor is shown as a color-coded indicator that glides smoothly across the map using velocity-extrapolated interpolation; cursors that move off the visible area are shown as directional arrow indicators clamped to the map edge so you always know where teammates are looking.
- Shared color-coded pins: Click in Drop Pin mode to place a pin at any map location. All pins are broadcast to every room member and persisted in room storage, so users who join mid-session see the complete set of pins immediately.
- Follow mode: When enabled, your map automatically flies to match any view changes made by other participants, making it easy to follow along during a presentation or guided tour without manually panning.
How it works
Mouse position is sampled at the pointer's geographic coordinates (latitude/longitude) and broadcast over a WebSocket room, throttled to one message every 150 milliseconds to keep bandwidth low. On each receiving client, cursor positions are updated using exponential interpolation with a 100 ms time constant, combined with short-term velocity extrapolation (250 ms decay) so cursors glide smoothly between network ticks rather than jumping.
Dropped pins and the current map view state are stored in persistent room data. When a new participant joins, they immediately receive the full pin list and last known view, so the shared workspace is always consistent regardless of when someone connects.
Options explained
- Follow — When active, your map automatically pans and zooms to match view changes broadcast by other room members. A brief visual indicator shows when the view is being driven by a remote user. Toggle it off to explore independently.
- Share Cursor — Controls whether your cursor position is broadcast to other participants. Disable this if you want to observe the shared map without revealing where you are looking.
- Drop Pin — Enters pin-dropping mode; the cursor changes to a crosshair and clicking the map places a color-coded pin at that location. The pin is instantly synced to all other room members. Click the button again to exit pin-dropping mode.
- Clear Pins — Removes all pins from the shared map and broadcasts the removal to every participant in the room.
Tips
- Share the full room URL from your browser's address bar — the room ID is in the URL, so anyone with the link can join.
- Use Follow mode when one person is presenting locations; others can toggle it off whenever they want to explore independently and re-enable it to re-sync.
- Disable Share Cursor if you prefer to observe quietly without broadcasting your position to other participants.
- Off-screen cursor arrows point toward where a teammate's cursor is located outside your current view — useful for knowing which direction to pan when following someone.