Changes between Version 20 and Version 21 of Help/Styles/MapCSSImplementation


Ignore:
Timestamp:
2013-02-07T19:21:26+01:00 (12 years ago)
Author:
bastiK
Comment:

update doc

Legend:

Unmodified
Added
Removed
Modified
  • Help/Styles/MapCSSImplementation

    v20 v21  
    1 This page documents details on JOSM's [http://wiki.openstreetmap.org/wiki/MapCSS/0.2 MapCSS] implementation. At the moment (May-2012) it is under active development and anything may change without warning.
     1This page documents details on JOSM's [http://wiki.openstreetmap.org/wiki/MapCSS/0.2 MapCSS] implementation.
    22[[TOC(inline)]]
    33== General Structure ==
     
    758758 list(a, b, ...)::
    759759  create list of values, e.g. for the {{{dashes}}} property
     760 get(lst, n)::
     761  get the ''n''th element of the list ''lst'' (counting starts at 0) [''since 5699'']
     762 split(sep, str)::
     763  splits string ''str'' at occurrences of the separator string ''sep'', returns a list [''since 5699'']
    760764 prop(''p_name'')::
    761765  value of the property ''p_name'', e.g. prop({{{"width"}}})
     
    778782 length(''str'')::
    779783  length of a string
     784 length(''lst'')::
     785  length of a list [''since 5699'']
    780786 concat(''str1'', ''str2'', ...)::
    781787  assemble the strings to one
    782788 JOSM_search("...")::
    783789  true, if JOSM search applies to the object
     790 regexp_test(regexp, string)::
     791  test if ''string'' matches pattern ''regexp'' [''since 5699'']
     792 regexp_test(regexp, string, flags)::
     793  test if ''string'' matches pattern ''regexp''; flags is a string that may contain "i" (case insensitive), "m" (multiline) and "s" (dot all) [''since 5699'']
     794 regexp_match(regexp, string)::
     795  tries to match ''string'' against pattern ''regexp''; returns a list of capture groups in case of success, ''null'' otherwise [''since 5699'']
     796 regexp_match(regexp, string, flags)::
     797  tries to match ''string'' against pattern ''regexp''; returns a list of capture groups in case of success, ''null'' otherwise; flags is a string that may contain "i" (case insensitive), "m" (multiline) and "s" (dot all) [''since 5699'']
     798 osm_id()::
     799  returns the OSM id of the current object [''since 5699'']
    784800{{{#!comment: untested
    785801 JOSM_pref(''key'', ''default'')