Changes between Version 160 and Version 161 of Styles


Ignore:
Timestamp:
2021-01-19T00:08:30+01:00 (5 years ago)
Author:
skyper
Comment:

little more info how to create a proper wiki page; add anchor; link=; harmonize format syntax

Legend:

Unmodified
Added
Removed
Modified
  • Styles

    v160 v161  
    33
    44= JOSM Map Styles =
    5 [[JOSMImage(dialogs/mapstyle,middle,margin-right=20,48)]] The JOSM [wikitr:/Help/MapView map display] can be easily customized with different styles. Many styles are included with JOSM by default.
     5[[JOSMImage(dialogs/mapstyle,middle,margin-right=20,48,link=)]] The JOSM [wikitr:/Help/MapView map display] can be easily customized with different styles. Many styles are included with JOSM by default.
    66
    77There are ''base styles'' (e.g. [source:/trunk/resources/styles/standard/elemstyles.mapcss JOSM standard] or [source:/trunk/resources/styles/standard/potlatch2.mapcss Potlatch 2]) that cover a wide range of features each. They can be combined with ''add-on styles'' that cover more special topics. See the [#Availablestyleslist available styles list] below.
     
    1010
    1111== Choose styles ==#ChooseStyles
    12 
    1312JOSM has ''three lists'' of ''map styles:'' available styles (all styles from the style repository) → active styles (your favourites) → ☑ chosen styles (actually used for the map painting).
    1413
     
    2120
    2221=== Activating more styles ===
    23 
    2422''Instructions:''
    2523
    26241. Open the [wikitr:/Help/Preferences/Map#MapPaintStyles Map Paint preferences]
    27  * via the header of the Map Paint Styles panel with the [[JOSMImage(dialogs/mappaintpreference)]] [wikitr:/Help/Dialog/MapPaint#MapStyleSettings Preferences] button or [[Image(addstyle.gif, right, 250px, title=animation of how to activate and choose an example style,margin=10)]]
     25 * via the header of the Map Paint Styles panel with the [[JOSMImage(dialogs/mappaintpreference)]] [wikitr:/Help/Dialog/MapPaint#MapStyleSettings Preferences] button or [[Image(addstyle.gif,right,250px,title=animation of how to activate and choose an example style,margin=10,link=)]]
    2826 * via [wikitr:/Help/Menu/View View menu] → ''Map paint styles'' → ''Map paint preferences'' or
    29  * via the general preferences dialog [wikitr:/Help/Menu/Edit Menu Edit] → [wikitr:/Help/Action/Preferences Preferences] → [[JOSMImage(preferences/map,20,middle)]] [wikitr:/Help/Preferences/Map Map Settings] (3rd button on the left) → Map Paint Styles (2nd tab))
     27 * via the general preferences dialog [wikitr:/Help/Menu/Edit Menu Edit] → [wikitr:/Help/Action/Preferences Preferences] → [[JOSMImage(preferences/map,24,middle,link=)]] [wikitr:/Help/Preferences/Map Map Settings] (3rd button on the left) → Map Paint Styles (2nd tab))
    30281. Choose a style in the list of ''Available styles'' (left side)
    31291. Activate it by clicking the [[JOSMImage(preferences/activate-right)]] blue right arrow button between the lists.
     
    3735You can add own styles (from any URL/file) to the list of active styles – for example a style file which you have [#CreateStyle created yourself]. Just click the [[JOSMImage(dialogs/add)]] plus sign on the right and enter either path and filename or URL of your style file.
    3836
     37
    3938== Available styles list ==
     39[[Styles(en|styles|short description|author|description|version|More details)]]
    4040
    41 [[Styles(en|styles|short description|author|description|version|More details)]]
    4241
    4342== Create your own style ==#CreateStyle
    4443You don't like the standard style? Change it to your own liking:
    4544
    46 * In the [wikitr:/Help/Dialog/MapPaint map paint style dialog], right click one of the styles and select [[JOSMImage(copy,middle,20)]] "save as...". A copy will be added to the list of styles. You can open the file in a text editor and reload after doing some changes.
     45* In the [wikitr:/Help/Dialog/MapPaint map paint style dialog], right click one of the styles and select [[JOSMImage(copy,middle,24,link=)]] "save as...". A copy will be added to the list of styles. You can open the file in a text editor and reload after doing some changes.
    4746* Or create a style from scratch and add it in the JOSM mappaint preferences.
    4847
     
    5453== Make your style available to other users ==
    5554* Either create a wiki page similar to [wiki:Styles/Modified].
    56  * don't forget to enclose your mappaint code by a code block (`#!style type="mapcss"` needs to be on a new line after `{{{`):
    57   * `{{{`
    58   * `#!style type="mapcss"`
    59   * ...
    60   * `}}}`
    61  * for automatic version adjustment you have to use `[[revision]]_[[date]]` in your version variable:
    62   * {{{[[revision]]}}} - is the latest version number of the wiki page
    63   * {{{[[date]]}}} - is the date of the last edit of the wiki page
    64   * recommended usage: {{{version="1.[[revision]]_[[date]]"}}} (converts to e.g. {{{1.13_2019-02-24}}})
     55 I. go to [wiki:Styles/MyStyleName https://josm.openstreetmap.de/wiki/Styles/MyStyleName]
     56  A. change the URL so it matches the name of your style; change only the last part after `...Styles/`, (preferred is CamelCase)
     57  a. press `Enter` after adjusting the name
     58 1. don't forget to enclose your mappaint code by a code block (`#!style type="mapcss"` needs to be on a **new line** after `{{{`):
     59  1. `{{{`
     60  1. `#!style type="mapcss"`
     61  1. ...
     62  1. `}}}`
     63 1. for automatic version adjustment you have to use `[[revision]]_[[date]]` in your version variable:
     64  * `[[revision]]` - is the latest version number of the wiki page
     65  * `[[date]]` - is the date of the last edit of the wiki page
     66  * recommended usage: `version="1.[[revision]]_[[date]]"` (converts to e.g. `1.13_2019-02-24`)
    6567  * this is required for an automatic update within JOSM
    6668 * **Note**: Spam filter prohibits adding many external (icon) links. Please, if possible, attach icons to the wiki page ([#Iconhandling see below]). …
     
    6971In both cases, the new style will be automatically listed in the table above after a few minutes. Then it will also be available in the JOSM mappaint preferences (after clicking the reload button).
    7072
    71 == Icons
     73== Icons ==#Icons
    7274`.png` and `.svg` files are supported. See [wikitr:/DevelopersGuide/DefaultPresets#NewIcons Defaultpresets New Icons] for details and problems with `.svg`
    7375
     
    8183* Use a path relative to your local style file. (This works only for Styles, not for Presets.)
    8284* Use a path relative to a directory specified at the bottom in the [wikitr:/Help/Preferences/Map#MapPaintStyles Styles preferences page] or [wikitr:/Help/Preferences/Map#TaggingPresets Presets preferences page].)
    83 * New icons can be directly referenced using a http-link. These are downloaded and cached internally.
     85* New icons can be directly referenced using a https- or http-link. These are downloaded and cached internally.
    8486* zip files are supported too.
    8587 * The zip file must contain at least one file with extension mapcss (for styles) or xml (for presets).
    8688 * Icon names and path are relative to the topmost zip directory.
    8789 * If there are multiple files, a file with "style" in the name is preferred (to allow packaging styles and presets in one archive).
    88 * Inline encoding as described in [[http://tools.ietf.org/html/rfc2397|RFC 2397]] is supported too.
    89  * Example for PNG: {{{data:image/png;base64,...databytes...}}}
    90  * Example for SVG: {{{data:image/svg+xml;base64,...databytes...}}}
    91  * [wikitr:/Help/Base64 More information] about {{{data:image/...}}} in JOSM.
     90* Inline encoding as described in [https://tools.ietf.org/html/rfc2397 RFC 2397] is supported too.
     91 * Example for PNG: `data:image/png;base64,...databytes...`
     92 * Example for SVG: `data:image/svg+xml;base64,...databytes...`
     93 * [wikitr:/Help/Base64 More information] about `data:image/...` in JOSM.
    9294* When the JOSM wiki is used for designing of new styles you have some additional options:
    9395 * Each file attached to the wiki page is automatically included in the zip file downloaded by JOSM.
     
    131133
    132134=== Nodes ===
    133 Most nodes that correspond to tags in the [osmwiki:Map_Features Map Features] page will show an appropriate icon, e.g. a white "P" on blue ground for {{{amenity=parking}}}.
     135Most nodes that correspond to tags in the [osmwiki:Map_Features Map Features] page will show an appropriate icon, e.g. a white "P" on blue ground for `amenity=parking`.
    134136
    135137There are some special icons for missing/incomplete things:
    136138
    137 [[Image(Mappaint_no_icon.png,margin-right=5)]] missing icon[[br]]
    138 We don't have the right icon for every node tag in map features yet, e.g. icons for most {{{natural=*}}} tags are still missing. If you encounter such a "missing icon", feel free to create a nice 16*16 pixel icon that matches the tag. To submit your work, open a [/newticket new ticket] and add your image or zip archive as attachment.
     139[[Image(Mappaint_no_icon.png,margin-right=5,link=)]] missing icon \\
     140We don't have the right icon for every node tag in map features yet, e.g. icons for most `natural=*` tags are still missing. If you encounter such a "missing icon", feel free to create a nice 16*16 pixel icon that matches the tag. To submit your work, open a [/newticket new ticket] and add your image or zip archive as attachment.
    139141
    140 [[Image(Mappaint_deprecated.png,margin-right=5)]] warning icon[[br]]
    141 The corresponding tag was once used but is no longer recommended to be used - or - it is not suitable for a node, e.g. {{{highway=motorway}}} just doesn't make sense on a node. Probably not all deprecated tags will show this icon.
     142[[Image(Mappaint_deprecated.png,margin-right=5,link=)]] warning icon \\
     143The corresponding tag was once used but is no longer recommended to be used - or - it is not suitable for a node, e.g. `highway=motorway` just doesn't make sense on a node. Probably not all deprecated tags will show this icon.
    142144
    143145=== Ways ===
     
    152154
    153155In addition, you can use the following hidden preferences:
    154 * {{{mappaint.fillalpha}}}
     156* `mappaint.fillalpha`
    155157 * alpha "opacity level", that is used to fill areas. An integer value between 0 (transparent) and 255 (solid) with the default of 50.
    156 * {{{mappaint.fillareas}}} (show areas)
     158* `mappaint.fillareas` (show areas)
    157159 * 10000000 (default) - areas will be filled with their corresponding colour and name will be rendered
    158160 * 0 - areas will be surrounded by lines only and name will not be rendered
    159161 * any other number - areas will be filled with their corresponding colour and name will be rendered at any zoom level below the given number in meters
    160 * {{{mappaint.showicons}}}
    161  * select whether icons are shown - same values as {{{mappaint.fillareas}}}
    162 * {{{mappaint.shownames}}}
    163  * select whether names are shown - same values as {{{mappaint.fillareas}}}
    164 * {{{mappaint.strokes}}}
    165  * select whether strokes or full lines are used - same values as {{{mappaint.fillareas}}}
    166 * ~~{{{mappaint.useRealWidth}}}~~
     162* `mappaint.showicons`
     163 * select whether icons are shown - same values as `mappaint.fillareas`
     164* `mappaint.shownames`
     165 * select whether names are shown - same values as `mappaint.fillareas`
     166* `mappaint.strokes`
     167 * select whether strokes or full lines are used - same values as `mappaint.fillareas`
     168* ~~`mappaint.useRealWidth`~~
    167169 * ~~true - ways will change width corresponding to the real width in meters set in the elemstyle.xml file~~
    168170 * ~~false (default) - ways will have the same width on every zoom level~~
    169 * {{{mappaint.zoomLevelDisplay}}}
     171* `mappaint.zoomLevelDisplay`
    170172 * true - elements visibility depends on zoom level
    171173 * false (default) - all elements are displayed
    172 * {{{mappaint.fontsize}}}
     174* `mappaint.fontsize`
    173175 * size of mappaint texts (default=8)
    174176
    175177----
    176 Back to [wikitr:/Help Main help]
     178Back to [wikitr:/Help Main Help]