fallback to default properties instead of not rendering when we don't have a style

refs #272
This commit is contained in:
Konstantin Käfer
2014-05-30 13:36:53 +02:00
parent 942da9cecc
commit 461a19dfa2
7 changed files with 32 additions and 11 deletions

View File

@@ -591,7 +591,11 @@ typename Styles::const_iterator find_style(const Styles &styles, const LayerDesc
template <typename Styles>
bool is_invisible(const Styles &styles, const LayerDescription &layer_desc) {
auto it = find_style(styles, layer_desc);
if (it == styles.end()) { return true; }
if (it == styles.end()) {
// We don't have a style, so we fall back to the default style which is
// always visible.
return false;
}
return !it->second.isVisible();
}