forked from organicmaps/organicmaps
[banners] Make sponsored types always visible, add banner categories
This commit is contained in:
parent
961d4749e3
commit
1e7b426971
5 changed files with 43 additions and 11 deletions
|
@ -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
|
||||
|
|
|
@ -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,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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue