Changes between Version 153 and Version 154 of Help/Styles/MapCSSImplementation


Ignore:
Timestamp:
2019-03-17T22:50:09+01:00 (5 years ago)
Author:
Klumbumbus
Comment:

more case sensitive fixes, better examples, see #17398 and r14896

Legend:

Unmodified
Added
Removed
Modified
  • Help/Styles/MapCSSImplementation

    v153 v154  
    250250{{{
    251251#!mapcss
    252 way[highway=residential]
    253 node[name="My name"]                       /* use quotes for if value includes spaces or if case sensitive matching is important */
    254 node["MY_Special_TAG"="another value"]     /* use quotes for tag names if case sensitive matching is required */
    255 node["ÖPVN"=tram]                          /* use quotes for tag keys with special characters */
    256                                            /*   note that these are not common in OSM at the moment */
     252way[highway=residential]                    /* is case sensitive, i.e. does NOT match e.g. highway=Residential or Highway=residential */
     253node[name="My name"]                        /* use quotes if key or value includes spaces */
     254node["name:ru"="Калининград"]               /* use quotes if key or value includes special characters like colons or unicode characters */
    257255}}}
    258256}}}
     
    268266#!mapcss
    269267way[highway!=residential]
    270 node[name!="My name"]                       /* use quotes if value includes spaces or if case sensitive matching is important */
    271 node["MY_Special_TAG"!="another value"]     /* use quotes for tag names if case sensitive matching is required */
    272 node["name:fr"!="mon nome"]                 /* use quotes for tag names with special characters like colons*/
     268node[name!="My name"]
     269node["name:ru"!="Калининград"]
    273270}}}
    274271}}}
     
    358355{{{
    359356#!mapcss
     357*[name =~ /^(?i)(parking)$/]                 /* matches parking, Parking, PARKING, PaRkInG,... */ 
    360358*[name =~ /^(?U)(\p{Lower})+$/]              /* name consists of only lower case unicode characters */                 
    361359}}}
     
    426424{{{
    427425#!mapcss
    428 way[highway]                     /* matches any way with a tag 'highway'                                              */
    429 way["VALSOU"]                    /* use quotes if case sensitive matching is required                                 */
    430 way["name:fr"]                   /* use quotes if the tag name includes special caracters (white space, colons, etc.) */
     426way[highway]                     /* matches any way with a tag 'highway' (is case sensitive)                                              */
     427way["name:fr"]                   /* use quotes if the tag name includes special caracters (white space, colons, unicode characters, etc.) */
    431428}}}
    432429}}}
     
    438435{{{
    439436#!mapcss
    440 way[!highway]                     /* matches any way which does not have a tag 'highway'                               */
    441 way[!"VALSOU"]                    /* use quotes if case sensitive matching is required                                 */
    442 way[!"name:fr"]                   /* use quotes if the tag name includes special caracters (white space, colons, etc.) */
     437way[!highway]                     /* matches any way which does not have a tag 'highway' (is case sensitive)                               */
     438way[!"name:fr"]                   /* use quotes if the tag name includes special caracters (white space, colons, unicode characters, etc.) */
    443439}}}
    444440}}}
     
    542538#!mapcss
    543539relation >[role=residential] way           
    544 relation >[role="My name"]   way           /* use quotes for if the role value includes spaces or if case sensitive matching is important */
     540relation >[role="My name"]   way           /* use quotes if the role value includes spaces or other special characters */
    545541}}}
    546542}}}