Changes between Version 44 and Version 45 of Styles


Ignore:
Timestamp:
2011-02-24T22:00:33+01:00 (15 years ago)
Author:
bastiK
Comment:

update

Legend:

Unmodified
Added
Removed
Modified
  • Styles

    v44 v45  
    2222= JOSM Styles =
    2323
    24 The JOSM map display (MapPaint) uses XML style files to convert the user provided tags to a map like display including e.g. colouring, line thickness and icons.
     24The JOSM map display can be customized with different styles.
    2525
    26 == Alternative Styles ==
     26== Choose Styles ==
    2727
    28 By changing the XML style file (or files) you can customize your JOSM's map display as you like. It is even possible to show more features (e.g. 'maxspeed' values) in the editor's map by adding a special style file.
    29 
    30 URLs for new style files can be entered by editing this page and then are automatically available in JOSM mappaint preferences (after a few minutes).
     28JOSM offers a preselection of styles, that can be turned on or off in the [[Help/Dialog/MapStyleDialog|map style dialog]]. There are base styles (e.g. [http://josm.openstreetmap.de/svn/trunk/styles/standard/elemstyles.xml JOSM standard] or [http://josm.openstreetmap.de/svn/trunk/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:
    3129
    3230[[Styles(en|styles|short description|author|description|version|More details)]]
    3331
    34 Note: In the settings the internal style can also be reached using "resource://styles/standard/elemstyles.xml".
     32To add more styles to your list, open the map style preferences by clicking the [[Image(source:/trunk/images/dialogs/mappaintpreference.png)]][[Help/Dialog/MapStyleDialog#MapStyleSettings|Settings]] button in the map style dialog.
     33{{{#!html
     34<span style="font-size:70%">(Alternatively you can navigate directly to the Map Paint Styles Preferences: Edit > Preferences > 3rd button on the left ("Settings for map projection and data interpretation") > 2nd tab ("Map Paint Styles"))</span>
     35}}}
     36
     37Let's assume that you're interested in sea maps, then you probably will make use of the style "SeaMap FreieTonne": Just highlight this entry in the "Available Styles" list by clicking on it and and press the [[Image(source:/trunk/images/preferences/activate-right.png)]]-button in the center. Now it should be one of your "Active Styles". Well, let's continue with advanced style usage! You created your own style (see below on this page)? Just click the [[Image(source:/trunk/images/dialogs/add.png)]]-sign on the right and enter either path and filename or URL of your style file.
    3538
    3639== Create your own style ==
     
    3841You don't like the standard style? Change it to your own liking:
    3942
    40  * Either use one of the above styles or the [http://josm.openstreetmap.de/svn/trunk/styles/standard/elemstyles.xml standard style] one as a base for own styles
    41  * Now you can edit the file (the [http://josm.openstreetmap.de/svn/trunk/styles/standard/elemstyles.xml standard style] contains a format description)
     43 * In the [[Help/Dialog/MapStyleDialog|map style dialog]], right click one of the styles and select [[Image(source:/trunk/images/copy.png)]]"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.
     44 * Or create a style from scratch and add it in the JOSM mappaint preferences.
    4245 * When you made new icons, see next chapter how to handle them.
    43  * Enter your style in the JOSM mappaint preferences.
    44  * ... restart JOSM and your new style will be used!
    45  * When the style should be available for other users as well, then add it to the above list of this page.
     46 * You can make your style available for other users as well: Edit this wiki page and add URLs for new style files in the list at the top. They will be automatically available in JOSM mappaint preferences (after a few minutes and clicking the reload button).
     47
     48
     49JOSM supports two formats to the define a style:
     50
     51 JOSM XML::
     52  The traditional style format in JOSM. See [[Help/Styles/XmlStyleFormat this]] help page for more details.
     53 MapCSS::
     54  Style language similar to [http://en.wikipedia.org/wiki/Cascading_Style_Sheets CSS] originally developed for Potlatch 2, but aims to be a standard for map styles. (since r3902)
     55  * General information can be found in the [http://wiki.openstreetmap.org/wiki/Category:MapCSS osm wiki].
     56  * A [[Help/MapStyles/MapCSSTutorial|Short tutorial]] should get you started.
     57  * The [[Help/MapStyles/MapCSSImplementation|JOSM implementation reference]] lists the supported freatures in more detail.
     58
     59Style files with different formats are compatible, they can be loaded at the same time.
     60
    4661
    4762=== Icon handling ===
     
    5469  * Icon names and path are relative to the topmost zip directory.
    5570  * If there are multiple XML files, a file with "style" in the name is preferred (to allow packaging styles and presets in one archive).
    56 
    57 == JOSM styles for newbies (HOWTO) ==
    58 
    59 To make any changes to JOSM's styles, go to the preferences panel (Menu: Edit->Preferences or hit [F12]). Then click the 3rd button on the left ("Settings for map projection and data interpretation") and select the "Map Paint Styles" tab.
    60 There you can find three text boxes: "Active Styles", "Available Styles" and "Icon paths".
    61 
    62 The upper one ("Active Styles") contains the currently selected *special* styles, but it maybe empty if you're just beginning to tweak JOSM's map paint stye :-)The middle one contains all "Available styles" for special purposes which are available. Let's assume that you're interested in sea maps, then you probably will make use of the style "SeaMap FreieTonne": Just highlight this line by clicking on it and push the "Copy Defaults" button, the selected line will show up in the upper box and will be active after the next JOSM start. You can add multiple styles as well, if you want. To delete a special style you don't use anymore, just select it in the upper box and hit the "Delete" button.
    63 
    64 Well, let's continue with advanced style usage! You created your own style (see below on this page)? Just click "Add" and enter either path and filename or URL of your style file.
    6571
    6672== Rendering ==
     
    8894Areas are ways that form a sort of ring. Most areas that corresponds to tags in the map features page will be filled with a special color (the filling will be transparent to some degree).
    8995
    90 === Direction arrows ===
    91 Direction arrows in this mode are only drawn for selected items, this gives you a a significant speedup while moving the map.
     96== Advanced Preferences ==
    9297
    93 == Preferences ==
    94 In the preferences editor you handle new style files as well as paths to the icons. Note that styles can be either additional or individual. If a style itself has a new internal name, then
    95 switching the "standard" default to this name creates a new display. Styles with equal names are additional. If you want to change the name of a style, you need to add the new name
    96 in front of the path using a "=" as separation. The same can be used for icon paths.
    97 
    98 You also can use the following hidden preferences:
     98You can use the following hidden preferences:
    9999 * mappaint.fillalpha
    100100  * alpha "opacity level", that is used to fill areas. An integer value between 0 (transparent) and 255 (solid) with the default of 50.