Changes between Version 12 and Version 13 of Help/Styles/MapCSSImplementation


Ignore:
Timestamp:
2011-04-11T13:16:29+02:00 (15 years ago)
Author:
bastiK
Comment:

better example for parent selector

Legend:

Unmodified
Added
Removed
Modified
  • Help/Styles/MapCSSImplementation

    v12 v13  
    143143
    144144Similar to a child selector, a parent selector only matches if if both the parent and the child object match. In contrast to
    145 to the child selector, the character < is used. In contrast to the child selector, the right hand side of the selector expression
    146 denotes the selector for the parent object.
     145to the child selector, the character < is used.
     146
     147In contrast to the child selector, the parent object will be "selected". In other words, the properties in the {{{{...}}}}-Declaration Block apply to the object on the right hand side of the "<" sign.
    147148
    148149Example:
     
    151152<pre class="mapcss" style="text-align: left; font: Courier; font-size: 10pt; background:rgb(242,243,210); border-style: dotted; border-width:1pt; border-color:darkGray; padding: 5pt">
    152153/*
    153  * only matches for a way which is a child of a relation with tags
    154  * type=route and route=foot
     154 * matches for a highway which has at least one node tagged as traffic_calming=*
    155155 */
    156 way < relation[type=route][route=foot] {...}
     156node[traffic_calming] < way[highway] {...}
    157157</pre>
    158158}}}