Changes between Initial Version and Version 1 of Styles/Direction


Ignore:
Timestamp:
2020-08-16T20:19:43+02:00 (5 years ago)
Author:
Hanikatu
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Styles/Direction

    v1 v1  
     1= [[Image(Ausrichtung.svg,30px,middle,inline)]] Direction
     2
     3== Description
     4The mappaint style "Direction" displays the following direction key: [https://wiki.openstreetmap.org/wiki/Key:direction direction] and [https://wiki.openstreetmap.org/wiki/Tag:highway=street_lamp#Typical_attributes light:direction].
     5
     6For ideas/questions/bugs/suggestions or similar please write a message to [https://www.openstreetmap.org/user/Hanikatu ​Hanikatu].
     7
     8Feel free to translate this wiki page into more languages. Already translated languages see top right.
     9
     10[[Image(Examples.png)]]
     11
     12=== Note:
     13Can only display one floodlight per node.
     14
     15== Code
     16{{{
     17#!style type="mapcss"
     18meta {
     19    title: "Direction for all Stuf";   /* title shown in the menu */
     20    icon: "Ausrichtung.svg"; /* small icon shown in the menu next to the title */
     21    version: "1.0.[[revision]]_[[date]]"
     22    description: "Shows the direction of stuf or light.";     
     23    author: "Hanikatu";
     24    link: "https://josm.openstreetmap.de/wiki/Styles/Direction";
     25}
     26
     27meta[lang=de] {
     28    title: "Objekt Ausrichtung";
     29    description: "Zeigt die Ausrichtung vom Objekt oder Licht an.";
     30    link: "https://josm.openstreetmap.de/wiki/De:Styles/Direction";
     31}
     32
     33/*
     34   zoomlevels:
     35   icons 21+ great
     36   below 20 smaller icons
     37
     38   ways: -19 narrow
     39   20+ dick
     40
     41   texts 16-20 short
     42   20- normal
     43*/
     44
     45
     46node|z17-[direction][highway !~ /^(give_way|stop)/]::randg
     47{
     48  /* alles was 'direction' enthält (außer give_way und stop) als Fehler markieren */
     49  /* doto: herausfinden, wie man individuelle Kreise erzeugt */
     50 
     51  symbol-shape: square;
     52  symbol-fill-color:orange;
     53  symbol-size:30;
     54  z-index:-1;
     55}
     56
     57node|z17-[direction =~ /[0-9]/][direction !~ /[-]/]::randg{
     58  /* nur ganze Grad-Zahlen - Fehler wird aufgehoben */
     59 
     60  icon-image: "Ausrichtung.svg";
     61  z-index:-100;
     62  icon-width:20; 
     63 
     64  icon-rotation: degree_to_radians( tag("direction") );
     65}
     66
     67node|z17-[direction =~ /[nsweNSWE]/][direction !~ /[^nsweNSWE]/]::randg{
     68  /* nur ganze Himmelsrichtungen - Fehler wird aufgehoben */
     69 
     70  icon-image: "Ausrichtung.svg";
     71  z-index:-100;
     72  icon-width:20; 
     73 
     74  icon-rotation: cardinal_to_radians( tag("direction") );
     75}
     76
     77node|z17-[light:direction =~ /[0-9]/][light:direction !~ /[-]/]::randg{
     78  /* nur ganze Grad-Zahlen - Fehler wird aufgehoben */
     79 
     80  icon-image: "Flutlicht.svg";
     81  z-index:-100;
     82  icon-width:50; 
     83 
     84  icon-rotation: degree_to_radians( tag("light:direction") );
     85}
     86
     87node|z17-[direction =~ /[nsweNSWE]/][direction !~ /[^nsweNSWE]/]::randg{
     88  /* nur ganze Himmelsrichtungen - Fehler wird aufgehoben */
     89 
     90  icon-image: "Flutlicht.svg";
     91  z-index:-100;
     92  icon-width:20; 
     93 
     94  icon-rotation: cardinal_to_radians( tag("light:direction") );
     95}
     96}}}