Skip to content

Commit

Permalink
Render brand=* if present for amenity=fuel, shop=supermarket, shop=de…
Browse files Browse the repository at this point in the history
…partment_store, amenity=bank and amenity=fast_food

Renders like one of the following:
[name]
[brand]
[name] + "\n(" + [name] + ")"

Which format is chosen, depends on what tags are present (name, brand or
both).
  • Loading branch information
floscher committed Sep 23, 2014
1 parent 3f36931 commit e294ae2
Showing 1 changed file with 35 additions and 3 deletions.
38 changes: 35 additions & 3 deletions amenity-points.mss
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,15 @@
[feature = 'amenity_biergarten'] {
[zoom >= 17] {
text-name: "[name]";
[feature = 'amenity_fast_food'] {
[brand = null],
[name = null] {
text-name: [name] + [brand];
}
[brand != null][name != null] {
text-name: [name] + "\n(" + [brand] + ")";
}
}
text-fill: #734a08;
text-size: 10;
text-dy: 9;
Expand Down Expand Up @@ -888,7 +897,14 @@
}

[feature = 'amenity_bank'][zoom >= 17] {
text-name: "[name]";
text-name: '';
[brand = null],
[name = null] {
text-name: [name] + [brand];
}
[brand != null][name != null] {
text-name: [name] + "\n(" + [brand] + ")";
}
text-size: 9;
text-fill: black;
text-dy: 9;
Expand Down Expand Up @@ -945,7 +961,16 @@
[feature = 'amenity_fuel'],
[feature = 'amenity_bus_station'] {
[zoom >= 17] {
text-name: "[name]";
text-name: [name];
[feature = 'amenity_fuel'] {
[brand = null],
[name = null] {
text-name: [name] + [brand];
}
[brand != null][name != null] {
text-name: [name] + "\n(" + [brand] + ")";
}
}
text-size: 9;
text-fill: @transportation-text;
text-dy: 9;
Expand Down Expand Up @@ -1159,7 +1184,14 @@
[feature = 'shop_supermarket'],
[feature = 'shop_department_store'] {
[zoom >= 16] {
text-name: "[name]";
text-name: '';
[brand = null],
[name = null] {
text-name: [name] + [brand];
}
[brand != null][name != null] {
text-name: [name] + "\n(" + [brand] + ")";
}
text-size: 9;
text-dy: 11;
text-fill: #939;
Expand Down

0 comments on commit e294ae2

Please sign in to comment.