= Disc Golf Course = == Description == I made this style to simplify tagging of disc golf courses in JOSM. With this style, mapping tees, baskets, holes, and other elements of a disc gold course become more intuitive and efficient. The clear visual representation and use of symbols and colors hopefully makes mapping easier. The style tries to catch common mapping pitfalls as found on https://wiki.openstreetmap.org/wiki/Tag:leisure%3Ddisc_golf_course - Using disc_golf=pin instead of disc_golf=basket. - Using ref=* somewhere else than on hole. - Using name=* on every hole instad or additionally to ref=* to force a rendering. (https://wiki.openstreetmap.org/wiki/Tagging_for_the_renderer) - Using landuse=* or natural=* to indicate its surface. Use surface=* instead. === Suggestions possible at === - https://community.openstreetmap.org/t/custom-map-style-for-josm-for-disc-golf-course/110688 - https://matrix.to/#/#osm-at:matrix.org - https://www.openstreetmap.org/user/Negreheb == Code == {{{ #!style type="mapcss" meta { title: "Disc Golf Course Testing"; version: "0.[[revision]]_[[date]]"; description: "Colouring and icons for a Disc Golf Course to make mapping it easier."; icon:"DiscGolfCourse.svg"; author: "Negreheb"; link: "https://josm.openstreetmap.de/wiki/Styles/DiscGolfCourse"; } meta[lang=de] { title: "Disc Golf Course"; description: "Einfärbungen und Symbole für einen Disc-Golf-Kurs, um das Mappen zu erleichtern."; link: "https://josm.openstreetmap.de/wiki/De:Styles/DiscGolfCourse"; } /* ------------------------------------------------------------------------------------------------------------------------ */ /* ------------------------------------------------------------------------------------------------------------------------ */ /* ------------------------------------------------------------------------------------------------------------------------ */ /**********************************************/ /* General setting */ /**********************************************/ node[disc_golf=tee]{ icon-image: "tee.svg"; icon-width: 75; icon-offset-x: 10; symbol-stroke-color: #FFC800; text: auto; } node[disc_golf=basket]{ icon-image: "basket2.svg"; icon-width: 50; icon-offset-y: -28; icon-offset-x: 1; text: auto; } way[disc_golf=hole]{ text: "ref"; font-size: 20; width: 25; opacity: 0.2; left-casing-color: black; left-casing-width: 2; left-casing-dashes: 0; left-casing-opacity: 0.7; right-casing-color: black; right-casing-width: 2; right-casing-opacity: 0.7; right-casing-dashes: 0; } node[disc_golf=drop_zone]{ text: eval("DZ"); text-color: orange; font-size: 10; casing-width: 10; symbol-size: 20; symbol-shape: circle; symbol-fill-color: orange; symbol-fill-opacity: 0.5; } /* If mando is tagged to an existing node like natural=tree, it will not get rendered */ /* But the text will appear next to it */ node[disc_golf=mando]{ text: eval("Mando"); text-color: red; font-weight: bold; font-size: 15; symbol-size: 20; symbol-shape: triangle; symbol-fill-color: red; symbol-fill-opacity: 0.5; } area[disc_golf=out_of_bounds]{ fill-color: red; text: eval("OB"); text-color: red; font-weight: bold; font-size: 15; /*text-halo-color: black;*/ } /**********************************************/ /* Common pitfalls */ /**********************************************/ /* ************** disc_golf=pin instead of basket */ node[disc_golf=pin]{ text: eval("Use basket"); text-color: purple; font-size: 20; font-weight: bold; color: purple; width: 30; opacity: 1; dashes: 0; symbol-size: 40; symbol-shape: circle; symbol-fill-color: purple; } /* ************** Catch a name on an hole */ way[disc_golf=hole][name]{ text: eval("NO NAME ON HOLE"); text-color: purple; font-size: 20; font-weight: bold; text-offset-y: 30; } /* ************** Catch everything tagged with golf=* */ *[golf]{ color: purple; width: 30; opacity: 1; dashes: 0; symbol-size: 40; symbol-shape: circle; symbol-fill-color: purple; } }}}