summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Beschow <bbeschow@cs.tu-berlin.de>2016-11-06 21:27:30 (GMT)
committerBernhard Beschow <bbeschow@cs.tu-berlin.de>2016-11-06 21:27:30 (GMT)
commitf76b677d4bec06bbeec95b7bf122f146008d1af3 (patch)
treef9d0c2dfb7a5ef47920a8919bce5788452bd23b3
parent8483e5f322babb7f7f4a0eb723c3a5de76a02eb1 (diff)
let the marbleZoomLevel tag have the last word about the zoom level of an OSM node
-rw-r--r--src/plugins/runner/osm/OsmNode.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/plugins/runner/osm/OsmNode.cpp b/src/plugins/runner/osm/OsmNode.cpp
index 3f839b5..42b4c79 100644
--- a/src/plugins/runner/osm/OsmNode.cpp
+++ b/src/plugins/runner/osm/OsmNode.cpp
@@ -63,14 +63,7 @@ void OsmNode::create(GeoDataDocument *document) const
}
placemark->setVisualCategory(category);
placemark->setStyle( GeoDataStyle::Ptr() );
-
- if (m_osmData.containsTagKey(QLatin1String("marbleZoomLevel"))) {
- int const zoomLevel = m_osmData.tagValue(QLatin1String("marbleZoomLevel")).toInt();
- placemark->setZoomLevel(zoomLevel);
- } else {
- placemark->setZoomLevel(zoomLevelFor(category, 18));
- }
-
+ placemark->setZoomLevel(zoomLevelFor(category, 18));
placemark->setPopularity(popularityFor(category, 100));
if (category >= GeoDataPlacemark::PlaceCity && category <= GeoDataPlacemark::PlaceVillageCapital) {
@@ -82,6 +75,11 @@ void OsmNode::create(GeoDataDocument *document) const
}
}
+ if (m_osmData.containsTagKey(QLatin1String("marbleZoomLevel"))) {
+ int const zoomLevel = m_osmData.tagValue(QLatin1String("marbleZoomLevel")).toInt();
+ placemark->setZoomLevel(zoomLevel);
+ }
+
OsmObjectManager::registerId(m_osmData.id());
document->append(placemark);
}