fallback to default properties instead of not rendering when we don't have a style
refs #272
This commit is contained in:
@@ -12,9 +12,10 @@ void Painter::renderText(TextBucket& bucket, const std::string& layer_name, cons
|
||||
|
||||
const std::unordered_map<std::string, TextProperties> &text_properties = map.getStyle().computed.texts;
|
||||
const std::unordered_map<std::string, TextProperties>::const_iterator text_properties_it = text_properties.find(layer_name);
|
||||
if (text_properties_it == text_properties.end()) return;
|
||||
|
||||
const TextProperties& properties = text_properties_it->second;
|
||||
const TextProperties &properties = text_properties_it != text_properties.end()
|
||||
? text_properties_it->second
|
||||
: defaultTextProperties;
|
||||
if (!properties.enabled) return;
|
||||
|
||||
mat4 exMatrix;
|
||||
|
||||
Reference in New Issue
Block a user