Search:
Login
Preferences
Help/Guide
About Trac
Register
Forgot your password?
Wiki
Timeline
Changelog
Browse Source
View Tickets
New Ticket
Roadmap
Builds
Sonar
Search
Context Navigation
+0
Start Page
Index
History
Editing De:TaggingPresets
Adjust edit area height:
8
12
16
20
24
28
32
36
40
Edit side-by-side
[[TranslatedPages(revision=56,outdated=Die Syntax der Objektvorlagen wurde geändert - deshalb benötigt diese Seite eine Bearbeitung\, partielle Übersetzung)]] = Objektvorlagen = JOSM unterstützt verteilte Objektvorlagen. Eine XML-Konfigurationsdatei, um die Eingabe von Tags (oder Eigenschaften, Anmerkungen) mit einem Dialog zu beschreiben. Die XML-Dateien können überall im Netz oder lokal im Dateisystem gespeichert werden. Objektvorlagen können durch den Benutzer auf der zentralen Seite [wiki:De:Presets JOSM Objektvorlagen] hinzugefügt werden. == Installieren einer Objektvorlage == Öffne den [Help/Action/Preferences Einstellungen Dialog], klicke auf [[Image(source:trunk/images/preferences/map.png,20)]] Karteneinstellungen und selektiere den dritten Reiter [Help/Preferences/Map#TaggingPresets "Objektvorlagen"]. ---- == Beispiel einer Objektvorlage == [[Image(wiki:TaggingPresets:tagging_screenshot.png,align=right)]] {{{ #!xml <presets xmlns="http://josm.openstreetmap.de/tagging-preset-1.0"> <item name="Highway"> <label text="Inserting a highway in UK" /> <text key="name" text="Highway (e.g. M3)" /> <combo key="highway" text="Type" values="major,minor" /> <!-- Highways are usually oneway --> <check key="oneway" text="Oneway" default="on" /> <!-- Always setting class=highway --> <key key="class" value="highway" /> </item> </presets> }}} == Beim veröffentlichen einer Objektvorlage – ergänze die Liste der Objektvorlagen == Siehe [wiki:De:Presets JOSM Objektvorlagen]. == Veröffentlichen einer neuen Objektvorlage – XML Format Beschreibung == Die Beschreibung einer Objektvorlage geschieht in einem einfachen XML Format. Im Kommentarbereich von **[source:trunk/data/defaultpresets.xml defaultpresets.xml]** steht die **gültige Formatbeschreibung**. Das vollständige XSD Schema ist im Namensraum URI (http://josm.openstreetmap.de/tagging-preset-1.0) sowie [source:trunk/data/tagging-preset.xsd im Quellverzeichnis] verfügbar. ---- == Develop a new preset – XML Format description (outdated!) == === Tags === The document prolog: '''<presets>''':: Has to be the main tag of the file. Supports following attributes * '''xmlns="http://josm.openstreetmap.de/tagging-preset-1.0"''' * '''author''' - the name of the author * '''version''' - a version of the file * '''description''' (i18n) - description what the file contains * '''shortdescription''' (i18n) - short overview description * '''link''' (i18n) - web link to further details * '''icon''' - informational icon for the preset Comments: '''<!-- this is an example comment -->''':: The document can contain embedded comments. Menu creation: '''<group>''':: Used to group items in sub menus. ''name'' is required, ''icon'' is optional attribute. '''<item>''':: Every item is one annotation set to select from. ''name'' is required, ''icon'' is optional attribute. '''<separator/>''':: Insert a line separator into the menu. Create instructions for the user: '''<label>''':: Labels are static texts for display. ''text'' is a required attribute. '''<optional>''':: Used to group some optional elements of an item. Possibly equivalent to <label text="Optional Attributes:"/> '''<space />''':: Add some space (ie a newline) in the preset display. Possibly equivalent to <label text=" "/> '''<link>''':: Specify a web link for this feature or to anything else of use. The ''href'' attribute is required. Attribute entry and selection dialog boxes: '''<text>''':: A text edit field to enter any arbitrary string from the user. ''key'' is mandatory, ''text'', ''default'' and ''required'' is optional '''<combo>''':: Displays a multiple choice combo box. ''key'' and ''values'' are mandatory and ''text'', ''default'', ''editable'' and ''required'' is optional. If editable is true (default), combo boxes can be edited as if they were text fields (additional to the drop down menu). Non editable combo boxes can only contain one of the specified values. '''<multiselect>''':: Displays a list from which zero or more items can be chosen. ''key'' and ''values'' are mandatory, and ''text'', ''default'', ''delimiter'', and ''required'' are optional. The selected values will be concatenated with the specified delimiter (default: semicolon) and written to the tag value. If a tag value has already been set when the preset dialog is opened, the multiselect will attempt to mark the appropriate items in the list as select. If the tag value cannot be represented by a combination of choices in the list, then the list will be disabled so that the user cannot accidentally overwrite a custom value. In contrast to the "combo" element, the "multiselect" expects the list of values, descriptions etc. to use the specified delimiter, i.e. by default you will have to use a semicolon. You can specify delimiter="," but then a comma will also be used in the tag value. '''<check>''':: A checkbox which the user can only select or deselect. The ''key'' attribute is mandatory. ''text'', ''default'' and ''required'' is optional. Set a key value pair: '''<key>''':: This tag will always set a key to a specific value. ''key'' is required and if ''value'' is present, the key will be set. If ''value'' attribute is ommited, the key is removed. === Attribute === The attributes of the tags have the following meaning: '''name="a_name"''':: Specify a name for an item. This name will be used in the GUI to display the tagging preset. '''name_context="context"''':: Translation context for name attribute to separate equals words with different meaning (not required for in-file translations). '''type="data_type"''':: When specified, only objects of the given type will be changed at all by this tagging preset. Can be "node", "relation", "way", "closedway" or any comma separated combination of them. '''icon="iconname"''':: A name of an icon that is within any classpath in the subdirectory of /images/symbols. You can load plugin-jar's to provide those images as well. The image will be used as icon to display in the selection list and when adding the preset to the toolbar. The icon should be quadratic in size. '''key="some_key"''':: This specifies the property key that will be modified by the item. '''text="Any text"''':: The description, that will be displayed before (after in case of <check>) the gui element. '''text_context="context"''':: Translation context for text attribute to separate equals words with different meaning (not required for in-file translations). '''default="default_value"''':: The default value for the item. If not specified, the current value of the key is chosen as default (if applicable). '''values="entry1,entry2,entry3"''':: 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. '''values_context="context"''':: Translation context for name attribute to separate equals words with different meaning (not required for in-file translations). '''display_values="Entry1,Entry2,Entry3"''':: A list of entries that is displayed to the user. Must be the same number of entries as values and '''editable''' must be false or not specified. For the delimiter character and escaping, see the remarks at ''values''. '''value="foobar"''':: Specify a value to be entered in the <key> tag. '''value_on="foobar"''':: Specify the true value to be entered in the <key> tag (default is "yes"). '''value_off="foobar"''':: Specify the false value to be entered in the <key> tag (default is "no"). '''editable="false"''':: The combo box is readonly, which means that the user can only select an item in the list. '''use_last_as_default="true"''':: For combo boxes or text fields the last value is used as default. Using "force" enforces this behaviour also for already tagged objects. '''rows="count"''':: Specify the number of rows in multiselect entry. '''name_template="template", name_template_filter="search expression"''':: Custom name formatter for osm primitives matching this preset. See [[NameTemplate]] for details. '''match="none|key|key!|keyvalue|keyvalue!"''':: Allows to change the matching process, i.e., determining whether the tags of an OSM object fit into this preset. If a preset fits then it is linked in the [wiki:Help/Dialog/TagsMembership Tags/Membership dialog]. * none: neutral, i.e., do not consider this item for matching * key: positive if key matches, neutral otherwise * key!: positive if key matches, negative otherwise * keyvalue: positive if key and value matches, neutral otherwise * keyvalue!: positive if key and value matches, negative otherwise Note that for a match, at least one positive and no negative is required. Default is "keyvalue!" for <key> and "none" for <text>, <combo>, <multiselect> and <check>. To support translations, all textual elements may be used in translated form. E.g. "de.name" would represent the name in case German language support is loaded. === Benutzung von Symbolen === Siehe [wiki:De:Styles#Iconhandling Styles]. == Ähnliche Seiten == * [wiki:De:Presets JOSM Objektvorlagen] * [wiki:Help/Preferences/Map#TaggingPresets Objektvorlageneinstellungen (en)]
Note:
See
WikiFormatting
and
TracWiki
for help on editing wiki content.
Change information
Your email or username:
E-mail address and name can be saved in the
Preferences
Comment about this change (optional):
Note:
See
TracWiki
for help on using the wiki.