Changes between Version 4 and Version 5 of Styles/Direction


Ignore:
Timestamp:
2021-06-06T12:53:56+02:00 (5 years ago)
Author:
Hanikatu
Comment:

added camera:direction + error correction for cardinal points from light:direction

Legend:

Unmodified
Added
Removed
Modified
  • Styles/Direction

    v4 v5  
    44
    55== Description
    6 The 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].
     6The mappaint style "Direction" displays the following direction key: [https://wiki.openstreetmap.org/wiki/Key:direction direction], [https://wiki.openstreetmap.org/wiki/Tag:highway=street_lamp#Typical_attributes light:direction] and [https://wiki.openstreetmap.org/wiki/Key:camera:direction camera:direction].
    77
    88For ideas/questions/bugs/suggestions or similar please write a message to [https://www.openstreetmap.org/user/Hanikatu ​Hanikatu].
     
    2121    title: "Direction";   /* title shown in the menu */
    2222    icon: "Ausrichtung.svg"; /* small icon shown in the menu next to the title */
    23     version: "1.0.[[revision]]_[[date]]";
     23    version: "1.1.[[revision]]_[[date]]";
    2424    description: "Shows the direction of object or light.";     
    2525    author: "Hanikatu";
     
    4646
    4747
     48/* --------------------- Fehler anzeigen ------------------------ */
     49
    4850node|z17-[direction][highway !~ /^(give_way|stop)/]::randg
    4951{
     
    5658  z-index:-1;
    5759}
     60
     61
     62/* --------------------- Richtung anzeigen ------------------------ */
    5863
    5964node|z17-[direction =~ /[0-9]/][direction !~ /[-]/]::randg{
     
    7782}
    7883
     84
     85/* --------------------- Flutlicht anzeigen ------------------------ */
     86
    7987node|z17-[light:direction =~ /[0-9]/][light:direction !~ /[-]/]::randg{
    8088  /* nur ganze Grad-Zahlen - Fehler wird aufgehoben */
     
    8795}
    8896
    89 node|z17-[direction =~ /[nsweNSWE]/][direction !~ /[^nsweNSWE]/]::randg{
     97node|z17-[light:direction =~ /[nsweNSWE]/][light:direction !~ /[^nsweNSWE]/]::randg{
    9098  /* nur ganze Himmelsrichtungen - Fehler wird aufgehoben */
    9199 
    92100  icon-image: "Flutlicht.svg";
    93101  z-index:-100;
    94   icon-width:20; 
     102  icon-width:50; 
    95103 
    96104  icon-rotation: cardinal_to_radians( tag("light:direction") );
    97105}
     106
     107
     108
     109/* --------------------- Kamerarichtung anzeigen ------------------------ */
     110
     111node|z17-[camera:direction =~ /[0-9]/][camera:direction !~ /[-]/]::randg{
     112  /* nur ganze Grad-Zahlen - Fehler wird aufgehoben */
     113 
     114  icon-image: "Ausrichtung.svg";
     115  z-index:-100;
     116  icon-width:20; 
     117 
     118  icon-rotation: degree_to_radians( tag("camera:direction") );
     119}
     120
     121node|z17-[camera:direction =~ /[nsweNSWE]/][camera:direction !~ /[^nsweNSWE]/]::randg{
     122  /* nur ganze Himmelsrichtungen - Fehler wird aufgehoben */
     123 
     124  icon-image: "Ausrichtung.svg";
     125  z-index:-100;
     126  icon-width:20; 
     127 
     128  icon-rotation: cardinal_to_radians( tag("camera:direction") );
     129}
    98130}}}