fix visual tests by restoring old hack to prevent rendering of all names
This commit is contained in:
parent
0b7272c94a
commit
c95b8ff8d7
4 changed files with 7 additions and 7 deletions
|
@ -251,15 +251,10 @@ bounds osm_way::get_bounds()
|
|||
|
||||
bool osm_way::is_polygon()
|
||||
{
|
||||
if (keyvals.find("building") != keyvals.end())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
for (unsigned int count = 0; count < ptypes.ptypes.size(); ++count)
|
||||
{
|
||||
if (keyvals.find(ptypes.ptypes[count].first) != keyvals.end() &&
|
||||
keyvals[ptypes.ptypes[count].first] == ptypes.ptypes[count].second)
|
||||
(ptypes.ptypes[count].second.empty() || keyvals[ptypes.ptypes[count].first] == ptypes.ptypes[count].second))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -49,6 +49,9 @@ public:
|
|||
|
||||
polygon_types()
|
||||
{
|
||||
ptypes.push_back(std::pair<std::string, std::string>("water", ""));
|
||||
ptypes.push_back(std::pair<std::string, std::string>("aeroway", ""));
|
||||
ptypes.push_back(std::pair<std::string, std::string>("building", ""));
|
||||
ptypes.push_back(std::pair<std::string, std::string>("natural", "wood"));
|
||||
ptypes.push_back(std::pair<std::string, std::string>("natural", "water"));
|
||||
ptypes.push_back(std::pair<std::string, std::string>("natural", "heath"));
|
||||
|
|
|
@ -66,6 +66,8 @@ void osmparser::startElement(xmlTextReaderPtr reader, const xmlChar *name)
|
|||
assert(xid);
|
||||
way->id = atol((char*)xid);
|
||||
cur_item = way;
|
||||
// Prevent ways with no name being assigned a name of "true"
|
||||
cur_item->keyvals["name"] = "";
|
||||
xmlFree(xid);
|
||||
}
|
||||
else if (xmlStrEqual(name,BAD_CAST "nd"))
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue