Modify

Opened 13 years ago

Closed 13 years ago

#5938 closed defect (fixed)

MapCSS and overlays

Reported by: Vidar Gundersen Owned by: bastiK
Priority: normal Milestone:
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 by bastiK, 13 years ago

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 by Vidar Gundersen, 13 years ago

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] {}

in reply to:  2 comment:3 by bastiK, 13 years ago

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 by bastiK, 13 years ago

Resolution: fixed
Status: newclosed

In [3902/josm]:

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

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain bastiK.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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