Changes between Version 41 and Version 42 of TaggingPresets
- Timestamp:
- 2012-04-05T13:37:40+02:00 (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TaggingPresets
v41 v42 3 3 JOSM 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]. 4 4 5 = Setup =6 Every user can choose to add any url (or filename) into his preferences. An example URL is included in JOSM SVN.7 5 8 [[Image(josm-preferences1.png)]] 6 == Install existing presets == 7 Open [[Help/Action/Preferences]], click [[Image(source:trunk/images/dialogs/mappaintpreference.png)]], select the tab **Tagging Presets**. 9 8 9 Then 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)]]. 10 10 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 == 11 Adding presets requires a restart of JOSM. Then the tagging presets can be selected from the [wiki:Help/Menu/Presets main menu]. 12 They 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 == 14 19 Here is an example of how it looks like: 15 20 16 21 [[Image(tagging_screenshot.png)]] 17 22 18 19 23 And this is the code that created the example : 20 24 {{{ 25 #!xml 21 26 <presets xmlns="http://josm.openstreetmap.de/tagging-preset-1.0"> 22 27 <item name="Highway"> … … 24 29 25 30 <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" /> 27 32 28 33 <!-- Highways are usually oneway --> … … 35 40 }}} 36 41 42 == Develop a new preset – Add to the list of available presets == 37 43 38 == XML Format description == 44 See [[Presets]]. 39 45 40 The tagging preset description is in a very simple XML format. 46 47 == Develop a new preset – XML Format description == 48 49 The tagging preset description is in a very simple XML format. 50 51 See 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!) == 41 56 42 57 === Tags === … … 103 118 '''default="default_value"''':: 104 119 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".107 120 '''values="entry1,entry2,entry3"''':: 108 121 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. … … 121 134 '''use_last_as_default="true"''':: 122 135 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.125 136 '''rows="count"''':: 126 137 Specify the number of rows in multiselect entry. … … 137 148 * Icon names and path are relative to the topmost zip directory. 138 149 * 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
