Changes between Version 156 and Version 173 of Presets


Ignore:
Timestamp:
(multiple changes)
Author:
(multiple changes)
Comment:
(multiple changes)

Legend:

Unmodified
Added
Removed
Modified
  • Presets

    v156 v173  
    1 ''If you want to learn installation steps for presets, see [Help/Preferences/Map#TaggingPresets "Tagging Presets" tab in Preferences > Map Settings]''[[br]]
    2 ''If you want to extend presets with your own see - [wiki:TaggingPresets TaggingPresets]''[[br]]
    3 ''If you want to publish a new item to the list below - [#PublishanewAvailablepresetsitem follow the instructions below the list]''
     1[[TranslatedPages]]
    42
    5 [[TranslatedPages]]
    6 [[PageOutline(1-10,Table of contents)]]
     3= Presets =
    74
    8 = What are presets? =
     5[[JOSMImage(dialogs/propertiesdialog,48,link=,margin-right=20,margin-bottom=10,middle,left)]]
     6
     7''If you want to learn installation steps for presets, see [[JOSMImage(dialogs/propertiesdialog)]] [wikitr:/Help/Preferences/TaggingPresetPreference Tagging Presets] register in [[JOSMImage(preference)]] [wikitr:/Help/Action/Preferences Preferences]'' \\
     8''If you want to extend presets with your own see - [wikitr:/TaggingPresets TaggingPresets]''
     9
     10[[PageOutline(2-10,Table of contents)]]
     11 \\
     12
     13== What are presets? ==
    914**Presets** in JOSM are menu-driven shortcuts to tag common object types in OpenStreetMap. They provide you with a user friendly interface to edit one or more objects at a time, suggest additional keys and values you may wish to add to those objects, and most importantly, prevent you from having to enter keys and values by hand.
    1015
    1116There are three types of Presets available to you in JOSM. Adding or removing any of these items requires restarting JOSM.
    12 1. The **Internal Preset** list, defined in [https://josm.openstreetmap.de/browser/trunk/data/defaultpresets.xml defaultpresets.xml], is the default set of presets available in the JOSM [https://josm.openstreetmap.de/wiki/Help/Menu/Presets Presets] menu. Changes to the Internal Presets requires modification of the JOSM source code.
    13 2. JOSM user-community created (and published) **Available presets**, which can be enabled through the [Help/Preferences/Map#TaggingPresets "Tagging Presets" tab in Preferences > Map Settings]. The full list of these Available presets, and how to publish a new one you create, appears below.
    14 3. **Custom Tagging Presets** files, for cases where you want to use customized Presets but they are not published to JOSM as an Available preset. Customized presets can be added through the [Help/Preferences/Map#TaggingPresets "Tagging Presets" tab in Preferences > Map Settings] menu, either by URL, or by filename on your local filesystem. The format of a Custom Tagging Presets .xml file appears at [wiki:TaggingPresets TaggingPresets].
     171. The **Internal Preset** list, defined in [source:/trunk/resources/data/defaultpresets.xml defaultpresets.xml], is the default set of presets available in the JOSM [wikitr:/Help/Menu/Presets Presets] menu. Changes to the Internal Presets requires modification of the JOSM source code.
     181. JOSM user-community created (and published) **Available presets**, which can be enabled through the [wikitr:/Help/Preferences/TaggingPresetPreference Tagging Presets] register in Preferences. The full list of these Available presets, and how to publish a new one you create, appears below.
     191. **Custom Tagging Presets** files, for cases where you want to use customized Presets but they are not published to JOSM as an Available preset. Customized presets can be added through the [wikitr:/Help/Preferences/TaggingPresetPreference Tagging Presets] register in Preferences, either by URL, or by filename on your local filesystem. The format of a Custom Tagging Presets .xml file appears at [wikitr:/TaggingPresets TaggingPresets].
    1520
    16 = JOSM Available presets =
     21== JOSM Available presets ==
    1722[[Styles(en|presets|short description|author|description|version|More details)]]
    1823
    19 == Publish a new Available presets item ==
    20 See [wiki:TaggingPresets] for the syntax of customized preset files. Be sure to validate a preset file before publishing it!
     24== Publish a new Available presets item ==#PublishanewAvailablepresetsitem
     25[=#Createnewpresets]
     26{{{#!comment
     27Deprecated #Createnewpresets target is called from some PresetsSource and DevelopersGuide/DefaultPresets pages
     28}}}
     29See [wikitr:/TaggingPresets] for the syntax of customized preset files. Be sure to validate a preset file before publishing it!
     30
    2131{{{
    2232#!comment
    2333Note for translators:
    24  - The reference below to change the source of this page should be modified, so it tells the reader to modify the English page.
     34 - The reference below to change the source of this page should not be modified, so it tells the reader to modify the English page.
    2535}}}
     36
    2637=== JOSM wiki Available preset (preferred method) ===
    27 * In order to add a new wiki based preset, simply create a new wiki page similar to the [#List existing wiki presets].
    28  * i.e. go to https://josm.openstreetmap.de/wiki/Presets/MyPresetName (Change the URL so it matches the name of your preset. Change only the last part after `...Presets/`.)
    29  * click 'create this page'
    30  * add content similar to existing preset wikis, e.g. [wiki:Presets/OneClick]
    31  * don't forget to enclose your preset code by a code block (`#!preset` needs to be on a new line after `{{{`):
    32   * `{{{`
    33   * `#!preset`
    34   * ...
    35   * `}}}`
    36  * save the wiki page
    37  * after a few minutes the new wiki preset will show up in the list and in JOSM automatically
    38  * for automatic version adjustment you have to use at least one of the two variables:
    39   * {{{[[revision]]}}} - is the latest version number of the wiki page
    40   * {{{[[date]]}}} - is the date of the last edit
    41   * recommended usage: {{{"1.[[revision]]_[[date]]"}}} (converts to e.g. {{{1.13_2014-02-24}}})
     38In order to add a new wiki based preset, simply create a new wiki page similar to the [#List existing wiki presets].
     39 I. go to [wiki:Presets/MyPresetName https://josm.openstreetmap.de/wiki/Presets/MyPresetName]
     40  A. change the URL so it matches the name of your preset; change only the last part after `...Presets/`, (preferred is CamelCase)
     41  a. press `Enter` after adjusting the name
     42 1. click 'create this page'
     43 1. add content similar to existing preset wikis, e.g. [wikitr:/Presets/OneClick]
     44 1. don't forget to enclose your preset code by a code block (`#!preset` needs to be on a **new line** after `{{{`):
     45  1. `{{{`
     46  1. `#!preset`
     47  1. `<?xml version="1.0" encoding="UTF-8"?>`
     48  1. ...
     49  1. `}}}`
     50 1. save the wiki page
     51 1. after a few minutes the new wiki preset will show up in the list and in JOSM automatically
     52 1. for automatic version adjustment you have to use `[[revision]]_[[date]]` in your version variable:
     53  * `[[revision]]` - is the latest version number of the wiki page
     54  * `[[date]]` - is the date of the last edit of the wiki page
     55  * recommended usage: `version="1.[[revision]]_[[date]]"` (converts to e.g. `1.13_2019-02-24`)
     56  * this is required for an automatic update within JOSM
     57
    4258=== Externally hosted Available preset ===
    43 * A new externally hosted preset URLs can be published by editing [[PresetsSource|this page]].
    44  * **Note**: Only URLs with file-extension (e.g. *.mapcss, *.xml, *.zip, *.php) are supported.
     59A new externally hosted preset URLs can be published by editing [wikitr:/PresetsSource this page]. \\
     60**Note**: Only URLs with file-extension (e.g. *.mapcss, *.xml, *.zip, *.php) are supported.
    4561
    46 See [wiki:Styles#CreateStyle] for a description how the JOSM wiki helps to create own styles or presets and how attached files and icons are handled.
     62=== Icon handling in Available presets ===#IconHandling
     63* See [wikitr:/Styles#Icons] for a description how attached files and icons are handled.
     64* Empty image paths like `icon=""` are not allowed.
    4765
    4866
    4967== Updating Available presets in JOSM ==
    50 Once an Available preset is published, it can take up to 10 days until the item appears in JOSM automatically. To immediately force an update you can perform the following steps:
    51 * Make sure [wiki:Help/ExpertMode Expert Mode] is enabled
    52 * Open the [wiki:Help/Action/Preferences Preferences]
    53 * Open the [wiki:Help/Preferences/Advanced Advanced Preferences]
    54 * Search for keys starting with: `mirror.https://josm.openstreetmap.de/josmfile?page_Presets/` (or `mirror.` for other external sources)
    55 * Select the preset you want to update
    56 * Click on Reset at the bottom of the window
    57 * Click on OK to save the changes (and to close the preference window)
    58 * Restart JOSM
     68Once a preset was updated in the wiki (or another external source) it takes up to 10 days until the preset gets updated in JOSM automatically. To immediately force an update you can do the following steps:
     691. Open the [wikitr:/Help/Action/Preferences Preferences]
     701. Make sure [wikitr:/Help/ExpertMode Expert Mode] is enabled
     711. Open the [wikitr:/Help/Preferences/Advanced Advanced Preferences]
     721. Search for keys starting with: `mirror.https://josm.openstreetmap.de/josmfile?page_Presets/` (or `mirror.` for other external sources)
     731. Select the preset you want to update
     741. Click on Reset at the bottom of the window
     751. Click on OK to save the changes (and to close the preference window)
     761. Restart JOSM
     77
     78or:
     79
     801. Remove the content of your [wikitr:/Help/Action/About#InstallationDetails <josm.cache>] folder
     811. Restart JOSM
    5982
    6083
     
    6487
    6588----
    66 Back to [wiki:/Help main help][[BR]]
    67 Back to [wiki:Help/Menu/Presets Presets menu]
     89Back to [wikitr:/Help/Menu/Presets Presets Menu] \\
     90Back to [wikitr:/Help Main Help]