Modify

Opened 2 years ago

Closed 2 years ago

#5938 closed defect (fixed)

MapCSS and overlays

Reported by: Vidar Gundersen Owned by: bastiK
Priority: normal Component: Core
Version: latest Keywords: mapcss, mappaint
Cc:

Description

How does MapCSS support overlaying, for example adding a transparent dashed red line on ways tagged with access=no?
This was solved using linemod in MapPaint's XML style sheets:

  <rule>
    <linemod mode="over" />
  </rule>

Attachments (0)

Change History (4)

comment:1 Changed 2 years ago by bastiK

Try

way[bridge=yes]::bridge_layer
{ 
    z-index: 4;
    width: +3;
    ...
}

Or this crazy example from Potlatch 2:

way|z17-[aeroway=runway]!:closed
    { z-index: 9; color: black; width: 11; casing-color: #aa66aa; casing-width: 12; } 
way|z17-[aeroway=runway]!:closed::aeroway2
    { z-index: 10; color: white; width: 9;  dashes: 0, 20, 4, 76; } 
way|z17-[aeroway=runway]!:closed::aeroway3
    { z-index: 11; color: black; width: 7; } 
way|z17-[aeroway=runway]!:closed::aeroway4
    { z-index: 12; color: white; width: 5;  dashes: 0, 20, 4, 76; } 
way|z17-[aeroway=runway]!:closed::aeroway5
    { z-index: 13; color: black; width: 3; } 
way|z17-[aeroway=runway]!:closed::aeroway6
    { z-index: 14; color: white; width: 1;  dashes: 4, 16; }
    
way|z15-16[aeroway=runway]!:closed
    { z-index: 9; color: black; width: 5;  } 
way|z15-16[aeroway=runway]!:closed::aeroway2 
    { z-index: 12; color: white; width: 5;  dashes: 0, 20, 4, 76; } 
way|z15-16[aeroway=runway]!:closed::aeroway3
    { z-index: 13; color: black; width: 3; } 
way|z15-16[aeroway=runway]!:closed::aeroway4
    { z-index: 14; color: white; width: 1;  dashes: 4, 16; } 
    
way|z-14[aeroway=runway]!:closed 
    { z-index: 9; color: #444444; width: 3;  } 

PS: I'll add more comprehensive documentation this weekend and the feature will be "officially" announced in a few days. Anyway, I appreciate beta testing. :)

comment:2 follow-up: Changed 2 years ago by Vidar Gundersen

The MapCSS support you've added to JOSM is great. Very much appreciated.

are matching of relations and multiple conditions supported? (it seems not.)

relation[route=foot] {}
relation[route=foot] way[highway] {}
way[access=no] way[highway] {}

comment:3 in reply to: ↑ 2 Changed 2 years ago by bastiK

Replying to Vidar Gundersen:

are matching of relations

No, not yet. Try this instead:

way[highway][JOSM_search("child route=foot")] {}

and multiple conditions supported? (it seems not.)

like this?

way[access=no][highway] {}

comment:4 Changed 2 years ago by bastiK

  • Resolution set to fixed
  • Status changed from new to closed

In [3902/josm]:

mapcss: minor improvements, fixes #5937 - MapCSS matching of piste:type=downhill, fixes #5938 - matching of relation members

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed .
as The resolution will be set. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.