Changes between Version 32 and Version 33 of Help/Styles/MapCSSImplementation


Ignore:
Timestamp:
2013-12-29T14:49:41+01:00 (12 years ago)
Author:
simon04
Comment:

+documentation for r6554

Legend:

Unmodified
Added
Removed
Modified
  • Help/Styles/MapCSSImplementation

    v32 v33  
    221221|-------------------------------------------------------------------------------
    222222{{{#!td align=left  valign=top
    223 =
     223`=`
    224224}}}
    225225{{{#!td align=left  valign=top   
     
    238238|-------------------------------------------------------------------------------
    239239{{{#!td align=left  valign=top
    240 !=
     240`!=`
    241241}}}
    242242{{{#!td align=left  valign=top   
     
    254254|-------------------------------------------------------------------------------
    255255{{{#!td align=left  valign=top
    256 <,>, <=, >=
     256`<`, `>`, `<=`, `>=`
    257257}}}
    258258{{{#!td align=left  valign=top   
     
    282282|-------------------------------------------------------------------------------
    283283{{{#!td align=left  valign=top
    284 $=
     284`$=`
    285285}}}
    286286{{{#!td align=left  valign=top   
     
    295295|-----------------------------------------------
    296296{{{#!td align=left  valign=top
    297 *=
     297`*=`
    298298}}}
    299299{{{#!td align=left  valign=top   
     
    308308|-------------------------------------------------------------------------------
    309309{{{#!td align=left  valign=top
    310 ~=
     310`~=`
    311311}}}
    312312{{{#!td align=left  valign=top   
     
    322322|-------------------------------------------------------------------------------
    323323{{{#!td align=left  valign=top
    324 =~
     324`=~`
    325325}}}
    326326{{{#!td align=left  valign=top   
     
    337337|-------------------------------------------------------------------------------
    338338{{{#!td align=left  valign=top
    339 !~ (since r6455)
     339`!~` (since r6455)
    340340}}}
    341341{{{#!td align=left  valign=top   
     
    349349}}}
    350350}}}
     351
     352Since r6554, it is possible to prefix the "value" (i.e., expression after the operator) with a `*` in order to "de-reference" it (i.e., obtain consider it as another key and obtain its value). Thus, `[key1 = *key2]` compares the value of `key1` with the value of `key2`, and `[key =~ */pattern/]` considers the value of the key `pattern` as a regular expression and matches it against the value of `key`.
    351353
    352354In addition, you can test whether a tag is present or not:
     
    387389}}}
    388390{{{#!td align=left  valign=top   
    389 * `way[/^addr:/]` (matches any `addr:*` key)
     391{{{
     392#!mapcss
     393way[/^addr:/]                     /* matches any `addr:*` key */
     394}}}
    390395}}}
    391396
     
    442447|-------------------------------------------------------------------------------
    443448{{{#!td align=left  valign=top
    444 =
     449`=`
    445450}}}
    446451{{{#!td align=left  valign=top   
     
    479484}}}
    480485|-------------------------------------------------------------------------------
    481 || {{{way|z12 {...}}}} || At zoom level 12 ||
    482 || {{{way|z13-15 {...}}}} || From 13 to 15 ||
    483 || {{{way|z16- {...}}}} || 16 and above ||
    484 || {{{way|z-12 {...}}}} || 12 and below ||
    485 || {{{way {...}}}} || any zoom level ||
     486|| {{{way|z12 {...} }}} || At zoom level 12 ||
     487|| {{{way|z13-15 {...} }}} || From 13 to 15 ||
     488|| {{{way|z16- {...} }}} || 16 and above ||
     489|| {{{way|z-12 {...} }}} || 12 and below ||
     490|| {{{way {...} }}} || any zoom level ||
    486491
    487492The precise definition of scale ranges for each zoom level may change in the future. By rule of thumb you can expect to be approximately at zoom level ''n'' when imagery displays slippymap tiles of level ''n''.