Modify

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#10184 closed defect (fixed)

MapCSS changes did break lane attribute style destination and destination:ref

Reported by: Klumbumbus Owned by: team
Priority: normal Milestone:
Component: External mappaint style Version:
Keywords: lane and road attributes Cc: imagic

Description

The fix in ticket #10142 worked fine, but there is one more error.

In JOSM latest 7257 destination and destination:ref on ways is not shown. (works in JOSM tested 7182)

Example see way/23358710

Attachments (0)

Change History (8)

comment:1 Changed 7 years ago by bastiK

Cc: imagic added

comment:2 Changed 7 years ago by bastiK

This is due to how the lane style worked around a MapCSS bug which was fixed in [7200]:

  • There are two forms of the prop function: With one and with two arguments. The one with one argument is a shortcut, when the layer equals the layer of the current selector.
    This is how it works at the moment.
  • Before [7200], the default value of the second argument was pretty much unpredictable: It was set to the layer of the last matching selector before that rule. (Hence the dummy rule way{} before, fixed the problem.)

This means the Lane style needs to be adapted, change

way{} /* If this is removed the following won't be interpreted */
way|z17-[is_prop_set(ok)][destination][prop(style_use_svg_destination)]::Destination

to

way|z17-[is_prop_set(ok, default)][destination][prop(style_use_svg_destination, default)]::Destination

I would recommend to keep the hack with way{} in for a couple of months, so it also works for users with older JOSM versions. (Either that or update the min version at the top to 7200)

comment:3 Changed 7 years ago by Klumbumbus

Yes, I just noticed, that this could be related to [7200], and mappaint style needs update

Last edited 7 years ago by Klumbumbus (previous) (diff)

comment:4 Changed 7 years ago by imagic

Just a short note: I'm on holiday so I will try to fix this in the style next week (or on a rainy day). I'm happy the problem causing those "way{}" has been identified. And one side note: I was under the impression that prop(..) with one argument always refers to the default layer, at least that was the way I used it in the style.

comment:5 Changed 7 years ago by bastiK

Inside the declaration block, it always referred to the current layer. (You write e.g. prop(lanes_bwd,"default") to account for this.) For consistency it should be the same inside the selector.

comment:6 Changed 7 years ago by imagic

I fixed the style today and also updated the JOSM mapccs documentation. I would be happy if someone could provide feedback if all issues are fixed or others have arisen. (Don't forget to clear your JOSM cache before trying to use the new style).

comment:7 Changed 7 years ago by Klumbumbus

Resolution: invalid
Status: newclosed

I checked the style. I couldn't find any problems.

comment:8 Changed 7 years ago by skyper

Component: Core mappaintExternal mappaint style
Resolution: invalidfixed

The style was adapted to proper syntax (diff).

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.