wiki:Styles/IconTester

Version 1 (modified by Klumbumbus, 5 years ago) ( diff )

new style

source:trunk/images/apply.svg Bench

Description

The mappaint style "IconTester" helps to test (GUI or mappaint) icons which may be added to JOSM.

You can use this mappaint style together with the default JOSM internal mappaint style.

For ideas/questions/bugs/suggestions or similar please write a message to Klumbumbus.

Usage

  • Add the path where you store your icons for testing in the preferences at the lower part of the Map Settings -> Map Paint Styles tab at "icons paths:"
  • Activate this style
  • Add a node and tag it with "icon" as key and the file name of the icon as value (without extension). It automatically adds .svg as extension.
  • If you want to test png icons use the key "iconpng". However note that new icons in the JOSM core must be svg.
  • To test a new version of an icon you must first create the file with a new (not yet used) file name and then retag the node in JOSM. JOSM caches the icon so you cannot just override the file because it will not update within JOSM. So simply use e.g. tree1.svg, tree2.svg,... as file names.

More information about new icons see DevelopersGuide/DefaultPresets.

Code

meta {
    title: "IconTester";
    version: "1.0.11_2021-05-15";
    description: "Helps to test new JOSM icons.";
    icon: "apply.svg";
    author: "Klumbumbus";
    link: "http://josm.openstreetmap.de/wiki/Styles/IconTester";
    /* min-josm-version: "???"; */ /* all JOSM versions except extremely old ones */
}

node[iconpng] {
        icon-image: eval(concat(tag(iconpng),".png"));
}

node[icon] {
        icon-image: eval(concat(tag(icon),".svg"));
}

Styles_IconTester-style.mapcss, Styles_IconTester.zip

Note: See TracWiki for help on using the wiki.