wiki:Styles/IconTester

source:trunk/images/apply.svg Icon tester

Description

The mappaint style "Icon tester" 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: "Icon tester";
    version: "1.0.3_2019-11-18";
    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

Last modified 3 weeks ago Last modified on 2019-11-18T20:50:33+01:00