wiki:Styles

Languages:

JOSM Styles

The JOSM map display can be customized with different styles.

Choose Styles

JOSM offers a preselection of styles, that can be turned on or off in the map style dialog. There are base styles (e.g. JOSM standard or Potlatch 2) that cover a wide range of features each. They can be combined with add-on styles that cover more special topics:

short descriptionauthordescriptionversion
 Iceland Ævar Arnfjörð Bjarmason Custom JOSM mappaint style for Iceland 0.1
 JOSM internal, no labels Attila Szasz Modified JOSM internal style which doesn't show any labels. 20110312
 SeaMap FreieTonne FreieTonne Seemap/ Seamarks from Project FreieTonne  More details 2012-02-04_11:20:14
 Mapnik (true) MapCSS variant of the OSM Mapnik style (as close as possible to the original). It is not very suitable for real mapping in an editor because nodes and lines without a style are hidden and opaque areas may cover each other. This file is optimized for JOSM and may need some minor changes to work properly with other MapCSS implementations. 0.1
 NaPTAN bus stops Vclaw Highlight bus stops (and taxi ranks) from Naptan import (UK), and whether they have been verified 0.1_2011-05-16
 OpenAviationMap Morten Olsen Lysgaard OpenAviationMap styling of aviation related data.  More details 0.0.2
 OpenSeaMap OpenSeaMap Seamarks for OpenSeaMap  More details 2011-02-13
BesideTheRoad_Speed kudrdima Visualization of traffic signs, road characteristics, some of the road infrastructure, traffic restrictions and prohibitions  More details 0.7_2011-09-28
British map overlay Ulf Lamping Special rules to take differences in the british area into account (e.g. traffic signs). 1.2_2011-02-25
EPCI (France) Don-vip Display French local authorities (known as EPCI) 1.3_2011-07-09
Paddenstoel guidepost vsandre Show a special icon for a paddenstoel guidepost. More details 1.5_2011-05-20
Japan Impassable Ways cmuelle8 Dash out ways tagged with barriers, visualize practicability=* More details 1.5_2011-03-22
Japan Tsunami POIS PierZen POIS related to Tsunami plus Surface / Roads with damages, obstacles More details 1.20_2011-05-15
Lit cmuelle8 Show lit=yes/no settings in JOSM map display 1.2_2011-03-15
Lit Objects achadwick Supplementary stylesheet which highlights lit and unlit objects by surrounding them with large glows. Works well with the Potlatch 2 base style. 0.1_2012-02-01
Maxspeed Rubke, Dirk Stöcker, Vclaw Show maxspeed settings in JOSM map display 1.5_2011-07-24
Speedlimit Signs Martin Koppenhoefer Display maxspeed on nodes by Speedlimit signs. 1.4_2011-09-22
Modified objects Sebastian Klein Highlight modified objects 0.1.6_2011-02-24
new parking features Mario Schütze Display the new parking features from "Proposed_features/parking" (see link).  More details 1.1_2012-02-01
Osmc hiking Martin Ždila Highlight marked hiking trails using osmc tagging schema. Optimized for SK/CZ marking. 0.1.1_2011-11-03
Parking lanes Sebastian Klemm Parking lanes along roads and parking/stopping restrictions.  More details 0.5_2011-09-09
plan.at ToDos simon04 Highlight problematic objects from plan.at import  More details 1.4_2011-05-03
Power Cobra A more detailed style for various power facilities and features 0.2.1_2011-12-06
Slovakia Bicycle Routes Martin Ždila Highlight bicycle routes tagged with Slovakia bicycle route tagging scheme. 0.1.2_2011-11-03
Surface cmuelle8 Visualize surface=* of objects More details 1.22_2011-03-22
Whitewater pankdm Visualization of some whitewater=* tags 0.4_2011-09-10

To add more styles to your list, open the map style preferences by clicking the source:/trunk/images/dialogs/mappaintpreference.pngSettings button in the map style dialog.

(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"))

Let'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 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 source:/trunk/images/dialogs/add.png-sign on the right and enter either path and filename or URL of your style file.

Create your own style

You don't like the standard style? Change it to your own liking:

  • In the map style dialog, right click one of the styles and select 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.
  • Or create a style from scratch and add it in the JOSM mappaint preferences.

JOSM supports two formats to define a style:

JOSM XML
The traditional style format in JOSM. The standard style contains some documentation.
MapCSS
Style language similar to  CSS originally developed for Potlatch 2, but aims to be a standard for map styles. (since r3902)

Style files with different formats are compatible, they can be loaded at the same time.

Make your style available to other users

  • Either edit this wiki page and add URLs for new style files to the list at the top.
  • Or create a wiki page similar to Styles/Maxspeed (XML) or Styles/Modified (MapCSS).

In 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).

Icon handling

There are different forms to handle icons:

  • Icons distributed with JOSM can be entered directly with the path (relative to JOSM's internal image directory).
  • Use a path relative to your local style file.
  • New icons can be directly referenced using a http-link. These are downloaded and cached internally.
  • Since JOSM version 2289 Zip-Files are supported.
    • The zip file must contain at least one file with extension xml.
    • Icon names and path are relative to the topmost zip directory.
    • If there are multiple XML files, a file with "style" in the name is preferred (to allow packaging styles and presets in one archive).
  • When the JOSM wiki is used for designing of new styles you have some additional options:
    • Each file attached to the wiki page is automatically included in the Zip downloaded by JOSM.
    • If you don't want a file in the Zip file, add the text (NOZIP) in the description of the attachment.
    • If you add a Zip file and want its contents included, you may add (EXTRACT) in the description of the attachment.
    • The server automatically switches from download of single file to Zip download when files are attached.

Styles managed in JOSM wiki

Rendering

Mappaint renders the map data so it looks much more like a map (colors, icons, annotations, ...) - compared to the JOSM wireframe mode.

Nodes

Most nodes that corresponds to tags in the  Map Features page will show an appropriate icon, e.g. a "P" on blue ground for amenity=parking.

There are some special icons for missing/incomplete things:

no icon missing icon We don't have the right icon for every node tag in map features yet, e.g. icons for most natural=xy 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 new ticket and add your image or zip archive as attachment.

deprecated icon warning icon 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.

Ways

Most ways that correspond to tags in the map features page will get special color, thickness and line style (e.g. dashed lines for railways).

Areas

Areas 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).

Advanced Preferences

You can use the following hidden preferences:

  • mappaint.fillalpha
    • alpha "opacity level", that is used to fill areas. An integer value between 0 (transparent) and 255 (solid) with the default of 50.
  • mappaint.fillareas (show areas)
    • 10000000 (default) - areas will be filled with their corresponding colour and name will be rendered
    • 0 - areas will be surrounded by lines only and name will not be rendered
    • 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
  • mappaint.showicons
    • select whether icons are shown - same values as mappaint.fillareas
  • mappaint.shownames
    • select whether names are shown - same values as mappaint.fillareas
  • mappaint.strokes
    • select whether strokes or full lines are used - same values as mappaint.fillareas
  • mappaint.useRealWidth
    • true - ways will change width corresponding to the real width in meters set in the elemstyle.xml file
    • false (default) - ways will have the same width on every zoom level
  • mappaint.zoomLevelDisplay
    • true - elements visibility depends on zoom level
    • false (default) - all elements are displayed
  • mappaint.fontsize
    • 8 - size of mappaint texts

Attachments