Hallo,
ich habe für JOSM einen Kartenstil erstellt. Der sieht so aus:
}
area[“building”]{
text: “building”;
text-position: center;
text-halo-opacity: 1;
text-halo-radius: 1.5;
text-color:#000000 ;
text-opacity: 1;
font-size: 20px;
width: 3;
color: #ff6e00 ;
casing-color: #000000 ;
casing-width: 1;
casing-opacity: 0.6;
fill-color: #ff6e00 ;
fill-opacity: 0.3
}
Wie kann ich den Bereich ( text: “building” einstellen, daß er mir mehrere Werte auf einmal anzeigt ? Gebäudeart, Gebäudenamen, Gebäudenummern etc.
Danke im voraus
In der Dokumentation von JOSM sind die Funktionen concat und eval beschrieben.
https://josm.openstreetmap.de/wiki/Help/Styles/MapCSSImplementation#Evalexpressions
Im Prinzip:
text: eval(concat(tag("first"), "-", tag("second")))
Kann man das auch so eingeben, daß es z.B. die ersten 5. Buchstaben anzeigt ?
PHerison
(P Herison)
February 3, 2022, 10:40am
5
substring(str, start, end)
return the substring of str, starting at index start (inclusive) up to end (exclusive) (0-indexed) [since r6534]
[edit] Paramter end fehlte
Hier als Formel ?
text: eval(concat(tag(“first”), “-”, tag(“second”)))
PHerison:
substring(str, start, end)
return the substring of str, starting at index start (inclusive) up to end (exclusive) (0-indexed) [since r6534]
[edit] Paramter end fehlte