Modify

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

     
    16191619        <item name="Passing Place" icon="presets/vehicle/passing_place.svg" type="node" preset_name_label="true">
    16201620            <link wiki="Tag:highway=passing_place" />
    16211621            <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>
    16221625            <preset_link preset_name="Emergency Bay" text="Similar but different tags:"/>
    16231626        </item> <!-- Passing Place -->
    16241627        <item name="Emergency Bay" icon="presets/vehicle/emergency_bay.svg" type="node,way" preset_name_label="true">
  • resources/styles/standard/elemstyles.mapcss

     
    10341034    icon-image: "presets/vehicle/passing_place.svg";
    10351035    set icon_z17;
    10361036}
     1037way > node[highway=passing_place][passing_place=left] {
     1038    icon-image: "presets/vehicle/passing_place.svg";
     1039    icon-rotation: parent_way_angle() + 90deg;
     1040}
     1041way > node[highway=passing_place][passing_place=right] {
     1042    icon-image: "presets/vehicle/passing_place.svg";
     1043    icon-rotation: parent_way_angle() - 90deg;
     1044}
    10371045node[highway=emergency_bay] {
    10381046    icon-image: "presets/vehicle/emergency_bay.svg";
    10391047    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 gaben, 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=both is not handled :)

It probably needs a new icon.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to gaben.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from team to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.