Changeset 3289 in josm for trunk/data/defaultpresets.xml


Ignore:
Timestamp:
2010-06-01T09:09:39+02:00 (9 years ago)
Author:
stoecker
Message:

added role support to presets

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/data/defaultpresets.xml

    r3279 r3289  
    4848  value_off: the value to set when unchecked (default is 'no')
    4949
     50role: type to specify possible roles in relations
     51  key: the role name used in relation
     52  text: fixed label to display
     53  requisite: "optional" or "required" (default is optional)
     54  count: how often can the role occur (if not given unlimited number is assumed)
     55  type: the data types - way,node,relation,closedway (separated by comma)
     56
    5057For external files the <annotations> should have following elements:
    5158- author           the author of the preset
     
    31793186    </group> <!-- Landuse -->
    31803187  </group>
    3181 <!-- FIXME: element role not yet supported! -->
    31823188    <group name="Relations" icon="presets/relations.png">
    31833189        <item name="Multipolygon" icon="presets/empty.png" type="relation">
     
    31933199                <role key="outer" text="outer segment" requisite="required" type="way" />
    31943200                <role key="inner" text="inner segment" requisite="optional" type="way" />
     3201            </roles>
     3202        </item>
     3203        <item name="Boundary" icon="presets/empty.png" type="relation">
     3204            <link href="http://wiki.openstreetmap.org/wiki/Relation:boundary"
     3205                  de.href="http://wiki.openstreetmap.org/wiki/DE:Relation:boundary"
     3206                  es.href="http://wiki.openstreetmap.org/wiki/ES:Relation:boundary"
     3207                  fr.href="http://wiki.openstreetmap.org/wiki/FR:Relation:boundary" />
     3208            <label text="Edit Boundary" />
     3209            <key key="type" value="boundary" />
     3210            <text key="name" text="Name" default="" delete_if_empty="true" />
     3211            <optional>
     3212                <combo key="boundary" text="Boundary type" values="administrative,national,civil,political" default="" delete_if_empty="true" />
     3213                <combo key="admin_level" text="Administrative level" values="1,2,3,4,5,6,7,8,9,10" default="" delete_if_empty="true" />
     3214            </optional>
     3215            <roles>
     3216                <role key="outer" text="outer segment" requisite="required" type="way" />
     3217                <role key="inner" text="inner segment" requisite="optional" type="way" />
     3218                <role key="subarea" text="Sub area" requisite="optional" type="relation" />
     3219                <role key="admin_centre" text="Administration centre" requisite="optional" type="node" />
    31953220            </roles>
    31963221        </item>
Note: See TracChangeset for help on using the changeset viewer.