[banners] Make sponsored types always visible, add banner categories

This commit is contained in:
Ilya Zverev 2016-12-01 16:55:31 +03:00
parent 961d4749e3
commit 1e7b426971
5 changed files with 43 additions and 11 deletions

View file

@ -1,10 +1,34 @@
[deliveryclub_ru]
start = 2016-12-01
# List of banner types.
#
# Each section in [square_quotes] corresponds to classificator type sponsored|banner|section_name.
# Inside a section, use following variables:
# - start=YYYY-MM-DD and end=YYYY-MM-DD: banner visibility period.
# - url=http://...: default banner URL, use templated vars in {quotes}.
# - icon: icon URL.
# - messages: base substring for messages, default is "banner_sectionname".
# Other variables can be used in URL templates.
[lamoda_ru]
end = 2017-01-15
icon =
url = http://fas.st/VtumFw
aux = test
url = http://fas.st/l1YJbD
[lamoda_ua]
start = 2016-12-01
end = 2017-01-15
url = http://fas.st/naNtn
[deliveryclub]
end = 2017-01-15
url = http://fas.st/VtumFw
[tutu]
end = 2017-01-15
url = http://fas.st/S9AciK
[geerbest]
end = 2017-01-15
[rentalcars]
end = 2017-01-15
[viator]
end = 2017-01-15

View file

@ -1137,3 +1137,10 @@ olympics|stadium;1136;
olympics|water_sport;1137;
olympics|bike_sport;1138;
sponsored|opentable;1139;
sponsored|banner|lamoda_ru;1140;
sponsored|banner|lamoda_ua;1141;
sponsored|banner|deliveryclub;1142;
sponsored|banner|tutu;1143;
sponsored|banner|geerbest;1144;
sponsored|banner|rentalcars;1145;
sponsored|banner|viator;1146;

1 building;[building];;addr:housenumber;name;1;
1137 olympics|water_sport;1137;
1138 olympics|bike_sport;1138;
1139 sponsored|opentable;1139;
1140 sponsored|banner|lamoda_ru;1140;
1141 sponsored|banner|lamoda_ua;1141;
1142 sponsored|banner|deliveryclub;1142;
1143 sponsored|banner|tutu;1143;
1144 sponsored|banner|geerbest;1144;
1145 sponsored|banner|rentalcars;1145;
1146 sponsored|banner|viator;1146;

View file

@ -1,3 +1,3 @@
# List of additional categories for OSM objects.
# Format: type,id,category
# Format: type,id,key1=value1,key2=value2,...
# Example: way,34306743,olympics=stadium

View file

@ -602,8 +602,7 @@ line|z16[man_made=pipeline][location=overground]
linecap: butt;
}
area|z16-[amenity=restaurant],
node|z16-[amenity=restaurant],
node|z16-[sponsored=opentable]
node|z16-[amenity=restaurant]
{
icon-image: restaurant.svg;
}
@ -729,8 +728,6 @@ node|z16-[tourism=hostel]
area|z16-[tourism=hotel],
area|z16-[tourism=motel],
node|z16-[tourism=hotel],
area|z18-[sponsored],
node|z18-[sponsored],
node|z16-[tourism=motel]
{
icon-image: hotel.svg;

View file

@ -214,6 +214,7 @@ namespace
static const uint32_t hwtag = classif().GetTypeByPath({ "hwtag" });
static const uint32_t psurface = classif().GetTypeByPath({ "psurface" });
static const uint32_t wheelchair = classif().GetTypeByPath({ "wheelchair" });
static const uint32_t sponsored = classif().GetTypeByPath({ "sponsored" });
// Caching type length to exclude generic [wheelchair].
uint8_t const typeLength = ftype::GetLevel(type);
@ -236,6 +237,9 @@ namespace
if (wheelchair == type && typeLength == 2)
return true;
if (sponsored == type)
return true;
return false;
}
}