Changes between Version 85 and Version 86 of Help/Styles/MapCSSImplementation


Ignore:
Timestamp:
2015-04-18T15:25:37+02:00 (10 years ago)
Author:
Klumbumbus
Comment:

+match last element of way/relation, + 2 examples

Legend:

Unmodified
Added
Removed
Modified
  • Help/Styles/MapCSSImplementation

    v85 v86  
    515515
    516516Nodes in ways and members in relations are ordered. You can formulate conditions on the position of a node in a way or a member
    517 object in a relation.
     517object in a relation. Positive numbers count from first to last element, negative numbers (since r8206) count from last to first element.
    518518
    519519{{{
     
    521521relation[type=route] >[index=1] way {  /* matches the first way which is a member of route relation  */
    522522   color: blue;
     523}
     524
     525way >[index=-1] node {  /* matches the last node of a way  */
     526   symbol-stroke-color: green;
     527}
     528
     529way!:closed >[index=1] node!:connection,
     530way!:closed >[index=-1] node!:connection {  /* matches all single way end nodes */
     531   symbol-stroke-color: green;
    523532}
    524533}}}