Changes between Version 41 and Version 42 of TaggingPresets


Ignore:
Timestamp:
2012-04-05T13:37:40+02:00 (14 years ago)
Author:
simon04
Comment:

updated, deprecate XML Format description and refer to defaultpresets.xml

Legend:

Unmodified
Added
Removed
Modified
  • TaggingPresets

    v41 v42  
    33JOSM supports distributed tagging presets. This is a XML config file that describes a GUI for entering tags (or properties, annotations, sometimes called map features). The XML files can be placed anywhere in the web or at the users local file system. Presets can be added by the users at a central page [wiki:Presets].
    44
    5 = Setup =
    6 Every user can choose to add any url (or filename) into his preferences. An example URL is included in JOSM SVN.
    75
    8 [[Image(josm-preferences1.png)]]
     6== Install existing presets ==
     7Open [[Help/Action/Preferences]], click [[Image(source:trunk/images/dialogs/mappaintpreference.png)]], select the tab **Tagging Presets**.
    98
     9Then add **available presets** using [[Image(source:trunk/images/preferences/activate-right.png)]], or include a local preset by clicking on [[Image(source:trunk/images/dialogs/add.png)]].
    1010
    11 After the sources are specified (and after a restart), the tagging presets can be selected from the [wiki:Help/Menu/Presets main menu].
    12 They can also be added to the toolbar under Preferences>[wiki:Help/Preferences/Toolbar Toolbar Customization]
    13 == Example ==
     11Adding presets requires a restart of JOSM. Then the tagging presets can be selected from the [wiki:Help/Menu/Presets main menu].
     12They can also be added to the toolbar under [wiki:Help/Preferences/Toolbar Toolbar Customization].
     13
     14[[Image(TaggingPresets.png)]]
     15
     16----
     17
     18== Develop a new preset – Example ==
    1419Here is an example of how it looks like:
    1520
    1621[[Image(tagging_screenshot.png)]]
    1722
    18 
    1923And this is the code that created the example :
    2024{{{
     25#!xml
    2126<presets xmlns="http://josm.openstreetmap.de/tagging-preset-1.0">
    2227  <item name="Highway">
     
    2429
    2530    <text key="name" text="Highway (e.g. M3)" />
    26     <combo key="highway" text="Type" values="major,minor" delete_if_empty="true" />
     31    <combo key="highway" text="Type" values="major,minor" />
    2732
    2833    <!-- Highways are usually oneway -->
     
    3540}}}
    3641
     42== Develop a new preset – Add to the list of available presets ==
    3743
    38 == XML Format description ==
     44See [[Presets]].
    3945
    40 The tagging preset description is in a very simple XML format.
     46
     47== Develop a new preset – XML Format description ==
     48
     49The tagging preset description is in a very simple XML format.
     50
     51See the comment section in **[source:trunk/data/defaultpresets.xml defaultpresets.xml]** for the **valid format description**.
     52
     53----
     54
     55== Develop a new preset – XML Format description (outdated!) ==
    4156
    4257=== Tags ===
     
    103118 '''default="default_value"'''::
    104119   The default value for the item. If not specified, the current value of the key is chosen as default (if applicable).
    105  '''delete_if_empty="true"'''::
    106    If the text (or combo) box is left empty, the key is removed instead inserting an key with empty value. Default is "false".
    107120 '''values="entry1,entry2,entry3"'''::
    108121   A list of entries (for the combo box and multiselect). The list has to be separated by commas (for the combo box) or by the specified delimiter (for the multiselect). If a value contains the delimiter, the delimiter may be escaped with a backslash. If a value contains a backslash, it must also be escaped with a backslash.
     
    121134 '''use_last_as_default="true"'''::
    122135   For combo boxes or text fields the last value is used as default. Using "force" enforces this behaviour also for already tagged objects.
    123  '''required="true"'''::
    124    Preset is not valid unless value for this key is entered. Used by PropertiesDialog to show list of presets for selected object.
    125136 '''rows="count"'''::
    126137   Specify the number of rows in multiselect entry.
     
    137148  * Icon names and path are relative to the topmost zip directory.
    138149  * If there are multiple XML files, a file with "preset" in the name is preferred (to allow packaging styles and presets in one archive).
    139