[[TranslatedPages]] = [[Image(layerchecker.svg,36,middle,inline)]] Layer checker = [[PageOutline(2-9)]] == Description == This style displays the value of [osmwiki:Key:layer] as a coloured underlay. This helps to check, if the correct `layer` value is tagged without the need to select every single way and look at the `layer` value. The following values are allowed: -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. All other values are reported as wrong value. There is a [wiki:Help/Dialog/MapPaint/StyleSettings style setting] to disallow also `layer=0`. The layers -9 to -3 and 3 to 9 each use the same color because `layer` values above 3 and below -3 are very rare (and often even errors). See also the legend below. You can change the colours in the [wiki:Help/Preferences/Display#Colors preferences] of JOSM. You should use Layer checker together with the default JOSM internal mappaint style. In the List of mappaint styles in the preferences Layer checker need to be below the internal style (which means higher priority). For ideas/questions/bugs/suggestions or similar please write a message to [osmwww:user/Klumbumbus Klumbumbus]. Feel free to translate this wiki page into more languages. Already translated languages see top right. === Example images === '''Example of Layer checker:''' [[Image(example.png)]] ^(data used for image [osmwww:copyright ©OpenStreetMap contributors] ODbL)^ '''Legend:''' [[Image(legend.png)]] [attachment:Testcenter.osm Testcenter] for quality assurance of this style. == Changelog == ^(Latest change first)^ ==== Version 1.0.x to 1.1.x ==== * disable distracting `piste:difficulty` style from internal paint style ==== Version 0.9.x to 1.0.x ==== * change default colours * add icon * add style setting to disallow `layer=0` ==== Version 0.9.x ==== * inital version == Code == {{{ #!style type="mapcss" meta { title: "Layer checker"; version: "1.1.[[revision]]_[[date]]"; description: "Display of layer values in JOSM map display."; icon: "layerchecker.svg"; author: "Klumbumbus"; link: "http://josm.openstreetmap.de/wiki/Styles/LayerChecker"; watch-modified: true; /* min-josm-version: "?"; */ /* not sure */ } meta[lang=de] { title: "Ebenenprüfer"; description: "Anzeige der layer-Werte in der JOSM-Kartenanzeige."; link: "http://josm.openstreetmap.de/wiki/De:Styles/LayerChecker"; } /* create settings */ setting::allow_layer_0 { type: boolean; label: tr("allow layer=0"); default: true; } /* Changes to the JOSM internal mappaint style elemstyles.mapcss to fit better together with Layer checker */ /* disable tiger layer */ way["tiger:reviewed"=no]::core_tiger { opacity: 0; } /* disable street names */ way[highway] { text: none; } /* disable piste:difficulty */ way["piste:difficulty"]::core_piste { width: 0; } way["piste:difficulty"]:closed::core_piste { width: 2; color: grey; } area["piste:difficulty"]:closed::core_piste { fill-opacity: 0; } /* make bridge and tunnel layer wider */ way[bridge]::core_bridge, way[tunnel=yes]::core_tunnel { width: +6; } /* display layer=* */ /* ways */ way["layer"=~/^(-9|-8|-7|-6|-5|-4|-3)$/]::layer { set layer; z-index: -3; color: layer_minus5#ff0000; } way["layer"="-2"]::layer { set layer; z-index: -2; color: layer_minus2#ff7519; } way["layer"="-1"]::layer { set layer; z-index: -1; color: layer_minus1#ffff00; } way["layer"="0"][setting("allow_layer_0")]::layer { set layer; z-index: 0; color: layer_0#b8b8b8; } way["layer"="1"]::layer { set layer; z-index: 1; color: layer_1#00ff00; } way["layer"="2"]::layer { set layer; z-index: 2; color: layer_2#00ffff; } way["layer"=~/^(9|8|7|6|5|4|3)$/]::layer { set layer; z-index: 3; color: layer_5#9933ff; } way.layer::layer { opacity: 0.9; width: 20; major-z-index: 1.9; /* below bridge layer of default style, to see the bridge */ } /* nodes */ node["layer"=~/^(-9|-8|-7|-6|-5|-4|-3)$/]::layer { set layer; z-index: -3; symbol-fill-color: layer_minus5#ff0000; } node["layer"="-2"]::layer { set layer; z-index: -2; symbol-fill-color: layer_minus2#ff7519; } node["layer"="-1"]::layer { set layer; z-index: -1; symbol-fill-color: layer_minus1#ffff00; } node["layer"="0"][setting("allow_layer_0")]::layer { set layer; z-index: 0; symbol-fill-color: layer_0#b8b8b8; } node["layer"="1"]::layer { set layer; z-index: 1; symbol-fill-color: layer_1#00ff00; } node["layer"="2"]::layer { set layer; z-index: 2; symbol-fill-color: layer_2#00ffff; } node["layer"=~/^(9|8|7|6|5|4|3)$/]::layer { set layer; z-index: 3; symbol-fill-color: layer_5#9933ff; } node.layer::layer { symbol-size: 26; symbol-shape: circle; z-index: -1; symbol-fill-opacity: 0.9; } /* report wrong value of layer */ way!.layer[layer]::layer { color: yellow; dashes-background-color: red; dashes: 4,24; opacity: 1; width: 5; text: tr("no correct value for layer!"); text-color: black; font-size: 11; text-halo-color: red; text-halo-radius: 2; casing-width: 1; casing-color: yellow; } node!.layer[layer]::layer { symbol-shape: triangle; symbol-fill-color: red; symbol-size: 30; symbol-stroke-color: yellow; text: tr("no correct value for layer!"); } }}}