Changes between Version 155 and Version 156 of Help/Styles/MapCSSImplementation


Ignore:
Timestamp:
2019-05-22T07:28:45+02:00 (7 years ago)
Author:
GerdP
Comment:

First attempt to document new operators ⊆,⊈,⊇, and ⊉

Legend:

Unmodified
Added
Removed
Modified
  • Help/Styles/MapCSSImplementation

    v155 v156  
    380380element of
    381381
    382 }}}
    383 {{{#!td align=left  valign=top   
    384 {{{
    385 #!mapcss
    386 node[amenity=parking] ∈ *[amenity=parking] {
     382Matches when an object matches the right selector(s) contains at least one element which match the left selector(s).
     383
     384}}}
     385{{{#!td align=left  valign=top   
     386{{{
     387#!mapcss
     388*[amenity=parking] ∈ area[amenity=parking] {
    387389  throwWarning: tr("{0} inside {1}", "amenity=parking", "amenity=parking");
    388390}
    389391}}}
     392Finds areas with `amenity=parking` that contain at least one node or area with `amenity=parking`.
     393Since r15064 this rule produces one warning for each element on the left when there are multiple matches.
     394}}}
     395|-------------------------------------------------------------------------------
     396{{{#!td align=left  valign=top
     397`⊆` ([http://www.fileformat.info/info/unicode/char/2286/index.htm U+2286], since r15102)
     398}}}
     399{{{#!td align=left  valign=top   
     400Subset of or Equal To
     401
     402Synonym for `∈`.
     403}}}
     404{{{#!td align=left  valign=top   
     405{{{
     406#!mapcss
     407*[amenity=parking] ⊆ area[amenity=parking] {
     408  throwWarning: tr("{0} inside {1}", "amenity=parking", "amenity=parking");
     409}
     410}}}
     411
     412}}}
     413|-------------------------------------------------------------------------------
     414{{{#!td align=left  valign=top
     415`⊇` ([http://www.fileformat.info/info/unicode/char/2287/index.htm U+2287], since r15102)
     416}}}
     417{{{#!td align=left  valign=top   
     418Superset of or Equal To
     419
     420Matches when an object matches the right selector(s) and is contained in one or more elements which match the left selectors.
     421
     422}}}
     423{{{#!td align=left  valign=top   
     424{{{
     425#!mapcss
     426area[amenity=parking] ⊇ *amenity=parking]
     427}}}
     428finds nodes or areas with `amenity=parking` inside areas with `amenity=parking`. Slower than `⊆` and thus not useful in validator rules, but can be useful in the search dialog.
     429
     430}}}
     431|-------------------------------------------------------------------------------
     432{{{#!td align=left  valign=top
     433`⊈` ([http://www.fileformat.info/info/unicode/char/2288/index.htm U+2288], since r15102)
     434}}}
     435{{{#!td align=left  valign=top   
     436Neither a Subset of nor Equal To
     437
     438Matches when an object matches the right selector(s) and does not contain any element which matches the left selectors.
     439
     440}}}
     441{{{#!td align=left  valign=top   
     442{{{
     443#!mapcss
     444*[highway=street_lamp] ⊈ area[amenity=parking][lit=yes]
     445}}}
     446finds areas amenity=parking that have lit=yes but don't contain a lamp.
     447}}}
     448|-------------------------------------------------------------------------------
     449{{{#!td align=left  valign=top
     450`⊉` ([http://www.fileformat.info/info/unicode/char/2289/index.htm U+2289], since r15102)
     451}}}
     452{{{#!td align=left  valign=top   
     453Neither a Superset of nor Equal To
     454
     455Matches when an object matches the right selector(s) and is not contained in any area which matches the left selectors.
     456
     457}}}
     458{{{#!td align=left  valign=top   
     459{{{
     460#!mapcss
     461area[landuse=residential] ⊉ *[building]
     462}}}
     463finds buildings which are not inside any landuse=residential area.
    390464}}}
    391465|-------------------------------------------------------------------------------