| | 1 | [[TranslatedPages]] |
| | 2 | |
| | 3 | = [[Image(backrest_yes.svg,36,middle,inline)]] Recycling Materials = |
| | 4 | [[PageOutline(2-9)]] |
| | 5 | |
| | 6 | == Description == |
| | 7 | |
| | 8 | The mappaint style "Bench" displays the following [osmwiki:Tag:amenity=bench bench] tags: seats, material, colour, backrest. |
| | 9 | |
| | 10 | You can use this mappaint style together with the default JOSM internal mappaint style. You can adjust the appearance in the [[Help/Dialog/MapPaint/StyleSettings|style settings]] of this style. |
| | 11 | |
| | 12 | For the materials the style uses the local translations of the internal bench preset. |
| | 13 | |
| | 14 | For ideas/questions/bugs/suggestions or similar please write a message to [osmwww:user/Klumbumbus Klumbumbus]. |
| | 15 | |
| | 16 | Feel free to translate this wiki page into more languages. Already translated languages see top right. |
| | 17 | |
| | 18 | [[Image(Examples.png)]] |
| | 19 | |
| | 20 | ^Example^ |
| | 21 | |
| | 22 | == Code == |
| | 23 | {{{ |
| | 24 | #!style type="mapcss" |
| | 25 | |
| | 26 | meta { |
| | 27 | title: "Bench"; |
| | 28 | version: "1.0.[[revision]]_[[date]]"; |
| | 29 | description: "Displays details of bench tags."; |
| | 30 | icon: "backrest_yes.svg"; |
| | 31 | author: "Klumbumbus"; |
| | 32 | link: "http://josm.openstreetmap.de/wiki/Styles/Bench"; |
| | 33 | min-josm-version: "7450"; /* because of user settings */ |
| | 34 | } |
| | 35 | |
| | 36 | meta[lang=de] { |
| | 37 | title: "Bank"; |
| | 38 | description: "Zeigt Details von Sitzbanktags an."; |
| | 39 | link: "http://josm.openstreetmap.de/wiki/De:Styles/Bench"; |
| | 40 | } |
| | 41 | |
| | 42 | /* user settings, fits to zoom behavior of default style if set to true */ |
| | 43 | setting::hide_bench { |
| | 44 | type: boolean; |
| | 45 | label: tr("Hide at low zoom"); |
| | 46 | default: true; |
| | 47 | } |
| | 48 | |
| | 49 | /* seats and material as text (uses user language if translated via the internal bench preset) */ |
| | 50 | node[amenity=bench]::benchlayer { |
| | 51 | text-anchor-horizontal: center; |
| | 52 | text-anchor-vertical: below; |
| | 53 | font-size: 9; |
| | 54 | } |
| | 55 | node|z22-::benchlayer { |
| | 56 | font-size: 11; |
| | 57 | } |
| | 58 | node[amenity=bench][seats][!material]::benchlayer { |
| | 59 | text: seats; |
| | 60 | } |
| | 61 | node[amenity=bench][!seats][material]::benchlayer { |
| | 62 | text: tr(tag(material)); |
| | 63 | } |
| | 64 | node[amenity=bench][seats][material]::benchlayer { |
| | 65 | text: eval(concat(tag(seats), " | " ,tr(tag(material)))); |
| | 66 | } |
| | 67 | |
| | 68 | /* backrest as icon */ |
| | 69 | node[amenity=bench][backrest!=yes][backrest!=no] { |
| | 70 | icon-image: backrest_unknown.svg; |
| | 71 | } |
| | 72 | node[amenity=bench][backrest=yes] { |
| | 73 | icon-image: backrest_yes.svg; |
| | 74 | } |
| | 75 | node[amenity=bench][backrest=no] { |
| | 76 | icon-image: backrest_no.svg; |
| | 77 | } |
| | 78 | |
| | 79 | /* colour as coloured filled circle */ |
| | 80 | node[amenity=bench][colour]::benchlayer { |
| | 81 | symbol-shape: circle; |
| | 82 | symbol-stroke-opacity: 0; |
| | 83 | symbol-fill-color: eval(tag(colour)); |
| | 84 | symbol-size: 22; |
| | 85 | z-index: -1; |
| | 86 | } |
| | 87 | |
| | 88 | /* Hide on low zoom */ |
| | 89 | node|z-17[setting("hide_bench")]::benchlayer { |
| | 90 | text: ""; |
| | 91 | } |
| | 92 | node|z-16[setting("hide_bench")]::benchlayer { |
| | 93 | symbol-fill-opacity: 0; |
| | 94 | } |
| | 95 | node|z-16[setting("hide_bench")] { |
| | 96 | icon-image: none; |
| | 97 | } |
| | 98 | |
| | 99 | }}} |