Opened 3 weeks ago
Last modified 3 weeks ago
#24698 new enhancement
[WIP patch] Add placement info to highway=passing_place preset
| Reported by: | gaben | Owned by: | team |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Internal preset | Version: | |
| Keywords: | passing_place rotation | Cc: |
Description
I'd like to add the placement info to the highway=passing_place preset.
Unfortunately, the following patch does not work as I want it to:
-
resources/data/defaultpresets.xml
1619 1619 <item name="Passing Place" icon="presets/vehicle/passing_place.svg" type="node" preset_name_label="true"> 1620 1620 <link wiki="Tag:highway=passing_place" /> 1621 1621 <key key="highway" value="passing_place" /> 1622 <optional> 1623 <combo key="passing_place" text="Placement in way direction" values="left,right,both" values_sort="false" /> 1624 </optional> 1622 1625 <preset_link preset_name="Emergency Bay" text="Similar but different tags:"/> 1623 1626 </item> <!-- Passing Place --> 1624 1627 <item name="Emergency Bay" icon="presets/vehicle/emergency_bay.svg" type="node,way" preset_name_label="true"> -
resources/styles/standard/elemstyles.mapcss
1034 1034 icon-image: "presets/vehicle/passing_place.svg"; 1035 1035 set icon_z17; 1036 1036 } 1037 way > node[highway=passing_place][passing_place=left] { 1038 icon-image: "presets/vehicle/passing_place.svg"; 1039 icon-rotation: parent_way_angle() + 90deg; 1040 } 1041 way > node[highway=passing_place][passing_place=right] { 1042 icon-image: "presets/vehicle/passing_place.svg"; 1043 icon-rotation: parent_way_angle() - 90deg; 1044 } 1037 1045 node[highway=emergency_bay] { 1038 1046 icon-image: "presets/vehicle/emergency_bay.svg"; 1039 1047 set icon_z17;
The issue is with the rotation: it is not always propagating on the map after changes (let alone on setting the passing_place=* key). I think it’s due to icon caching, but haven't had the time to figure out, yet.
It affects every dynamic icon preset as I've seen it so far.
(I got the idea from Styles/orientation for traffic signs mappaint style.)
Attachments (0)
Change History (1)
comment:1 by , 3 weeks ago
| Summary: | [patch] Add placement info to highway=passing_place preset → [WIP patch] Add placement info to highway=passing_place preset |
|---|



I know, the
passing_place=bothis not handled :)It probably needs a new icon.