Repository navigation
Conversation
Allows assigning a distinct color to each user or user/device for location history lines, location points and the last-location accuracy circle, so multiple people's tracks can be told apart on the map. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011d6FepEJGvpCwcrNRQ2gr6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add
map.colorsoption for per-user/device colorsWhen several users or devices are shown on the map at once, all location history lines, location points and accuracy circles use the same color, which makes it hard to tell whose track is whose. This adds a
map.colorsconfig option that assigns a color per user or peruser/device.Usage
"user"or"user/device"; a"user/device"entry takes precedence over a"user"entry.map.polyline,map.circleMarkerandmap.circlecolors (which default toprimaryColor), so existing setups look exactly the same.{}.Changes
src/store/getters.js:filteredLocationHistoryLatLngGroupsnow returns{ user, device, latLngs }objects instead of bare arrays, so each line segment knows which device it belongs to.Map.vueis the only consumer.src/views/Map.vue: newdeviceColor(user, device, fallback)method, used for the polyline, location point and accuracy circle colors.src/config.js: defaultmap.colors: {}.src/index.d.ts:colors: Record<string, string>added to the config type.docs/config.md: documentedmap.colorswith an example.The pin marker for the last location is unchanged (it is an icon, not a colored vector layer).
Testing
npm run lint:js,npm run lint:md,npm run lint:scss,npm testandnpm run buildall pass.docker/Dockerfileand ran it against an existing Recorder with two users (iOS and Android devices). Withcolorsset, each user's tracks and accuracy circle render in their own color; without it, the map looks unchanged.colors: { alice: "#3b6fd4", bob: "#e06c4f" }. The screenshot uses synthetic tracks (generated.recfiles served by an HTTP-only Recorder) rather than real location data.I didn't add a
CHANGELOG.mdentry since entries there are grouped by release; happy to add one if you'd prefer.🤖 Generated with Claude Code