Commit 61fb4511 authored by Dennis Nienhüser's avatar Dennis Nienhüser

Find any icon instead of traversing all

The code here addresses elements that have multiple tags with
corresponding visual categories, e.g. bakery and butcher in
the same place, and makes sure that if we have an icon for
any of those categories then this is set.
parent fad3e567
......@@ -905,13 +905,16 @@ GeoDataStyle::ConstPtr StyleBuilder::createStyle(const StyleParameters &paramete
if (style->iconStyle().iconPath().isEmpty()) {
QList<GeoDataFeature::GeoDataVisualCategory> categories = visualCategories(osmData);
foreach(GeoDataFeature::GeoDataVisualCategory category, categories) {
const GeoDataStyle::ConstPtr categoryStyle = GeoDataFeature::presetStyle(category);
if (!categoryStyle->iconStyle().iconPath().isEmpty()) {
if (!categoryStyle->iconStyle().icon().isNull()) {
GeoDataStyle::Ptr newStyle(new GeoDataStyle(*style));
style = newStyle;
} else if (placemark->geometry()->nodeType() == GeoDataTypes::GeoDataLineStringType) {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment