Why not ask your question on the new OpenStreetMap Community Forum?

I try to customize my own carto style. I try to reduce building names in my city only to the most important ones. I've found in style/addressing.mss part:

    #building-text {

[zoom >= 14][way_pixels > 3000],
[zoom >= 17] {
text-name: "[name]";
text-face-name: @book-fonts;
text-fill: #444;
text-halo-radius: @standard-halo-radius;
text-halo-fill: @standard-halo-fill;
text-size: 11;
text-wrap-width: 22; // 2.0 em
text-line-spacing: -1.65; // -0.15 em
}
}
(I cannot format that properly)

And by manipulating that values I can see that building names change and it's fine. What I'm wondering can I use that styling only to some groups/tags? In example to use that style only for building: train_station and not use in example for building: commercial. Or Can I use that attribute for building: train_station or building: yes (I don't have another examples, just wondering if the OR is possible).

I tried to find this in carto documentation pdf, but I couldn't find anything which at least aimed me to the solution.

asked 24 Mar '21, 12:48

engopy's gravatar image

engopy
126101015
accept rate: 0%

I tested to add [building = 'train_station'] inside curly braces, but from Kosmtik I received some SQL exception with some SELECT query. Looked at that query I figured out that maybe building attribute is not selecting from DB, so I tried to use name like: [name = 'Dworzec PKP Gliwice'] and indeed only that building is labeled. But I'm looking for some more general solution, not selecting them by name which is very specific for concrete building.

(24 Mar '21, 13:10) engopy
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×341
×65
×23

question asked: 24 Mar '21, 12:48

question was seen: 535 times

last updated: 24 Mar '21, 13:10

powered by OSQA