feat: override which turn arrow a lane shows
The arrow on a lane came from the OSM turn:lanes tag with no way to change it, and a lane the tag skipped got no arrow at all. lane-maneuver is a v1 override that sets it. v1 rather than a v2 constraint, because "which arrow" is a discrete attribute of a lane with no station to anchor to, while every v2 anchor is positional. The existing road override already covers OSM-derived values this way — laneCount, width, sidewalks — and this is the same kind of thing. Arrow *placement* is the positional half and stays out; it also still has an open question about whether a group is a lane or a single arrow. Three behaviours, each measured against compiled output: an override replaces the tag's maneuver, it adds arrows to a lane the tag never marked, and '' removes one the tag asked for. The empty string is therefore distinguished from "no override" rather than falling through to the tag. An empty override set leaves the arrows byte-identical and the fixtures untouched. Validation lists the accepted maneuvers and rejects anything else, including correctly-spelled components in the wrong order. It cannot be left to normalizeManeuver(), which returns unrecognised input unchanged — a typo would otherwise reach the template lookup and silently produce no arrow. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
15d41be444
commit
335c8ea68a
7 files changed
+173
-2
No files matched your search
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"id": "lane-maneuver-override",
|
||||
"name": "lane-maneuver-override",
|
||||
"title": "车道转向箭头覆盖",
|
||||
"description": "v1 override 新增 lane-maneuver:覆盖 OSM turn:lanes,决定某条车道画什么导向箭头",
|
||||
"status": "in_progress",
|
||||
"dev_type": null,
|
||||
"scope": null,
|
||||
"package": null,
|
||||
"priority": "P2",
|
||||
"creator": "dingkang",
|
||||
"assignee": "dingkang",
|
||||
"createdAt": "2026-08-31",
|
||||
"completedAt": null,
|
||||
"branch": null,
|
||||
"base_branch": "main",
|
||||
"worktree_path": null,
|
||||
"commit": null,
|
||||
"pr_url": null,
|
||||
"subtasks": [],
|
||||
"children": [],
|
||||
"parent": "08-26-direct-manipulation-road-editor",
|
||||
"relatedFiles": [],
|
||||
"notes": "",
|
||||
"meta": {}
|
||||
}
|
||||
Reference in new issue
Block a user