summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Nienhüser <nienhueser@kde.org>2016-11-01 14:58:12 (GMT)
committerFriedrich W. H. Kossebau <kossebau@kde.org>2016-11-05 16:49:27 (GMT)
commit6e53a7877daffdbeca077b6df8644e2781ff882b (patch)
treeb5f00c807766e6aed2dabe88861becad6e11edbc
parent84ec936926710c305a9c3d86e12dd01e51a64454 (diff)
Commit 3b9aa31 was intended to reveal peaks; whitelist them instead.
-rw-r--r--src/plugins/runner/osm/OsmNode.cpp57
1 files changed, 30 insertions, 27 deletions
diff --git a/src/plugins/runner/osm/OsmNode.cpp b/src/plugins/runner/osm/OsmNode.cpp
index ba54c28..dbda8d8 100644
--- a/src/plugins/runner/osm/OsmNode.cpp
+++ b/src/plugins/runner/osm/OsmNode.cpp
@@ -59,39 +59,42 @@ void OsmNode::create(GeoDataDocument *document) const
placemark->setVisualCategory(category);
placemark->setStyle( GeoDataStyle::Ptr() );
- placemark->setZoomLevel( 11 );
+ switch (category) {
+ case GeoDataPlacemark::PlaceCity:
+ case GeoDataPlacemark::PlaceCityCapital:
+ placemark->setZoomLevel(9);
+ break;
+ case GeoDataPlacemark::PlaceSuburb:
+ placemark->setZoomLevel(13);
+ break;
+ case GeoDataPlacemark::PlaceHamlet:
+ placemark->setZoomLevel(15);
+ break;
+ case GeoDataPlacemark::PlaceLocality:
+ placemark->setZoomLevel(15);
+ break;
+ case GeoDataPlacemark::PlaceTown:
+ case GeoDataPlacemark::PlaceTownCapital:
+ placemark->setZoomLevel(11);
+ break;
+ case GeoDataPlacemark::PlaceVillage:
+ case GeoDataPlacemark::PlaceVillageCapital:
+ placemark->setZoomLevel(13);
+ break;
+ case GeoDataPlacemark::NaturalPeak:
+ placemark->setZoomLevel(11);
+ break;
+ default:
+ placemark->setZoomLevel(17);
+ break;
+ }
+
if (category >= GeoDataPlacemark::PlaceCity && category <= GeoDataPlacemark::PlaceVillageCapital) {
int const population = m_osmData.tagValue(QStringLiteral("population")).toInt();
placemark->setPopulation(qMax(0, population));
if (population > 0) {
placemark->setZoomLevel(populationIndex(population));
placemark->setPopularity(population);
- } else {
- switch (category) {
- case GeoDataPlacemark::PlaceCity:
- case GeoDataPlacemark::PlaceCityCapital:
- placemark->setZoomLevel(9);
- break;
- case GeoDataPlacemark::PlaceSuburb:
- placemark->setZoomLevel(13);
- break;
- case GeoDataPlacemark::PlaceHamlet:
- placemark->setZoomLevel(15);
- break;
- case GeoDataPlacemark::PlaceLocality:
- placemark->setZoomLevel(15);
- break;
- case GeoDataPlacemark::PlaceTown:
- case GeoDataPlacemark::PlaceTownCapital:
- placemark->setZoomLevel(11);
- break;
- case GeoDataPlacemark::PlaceVillage:
- case GeoDataPlacemark::PlaceVillageCapital:
- placemark->setZoomLevel(13);
- break;
- default:
- placemark->setZoomLevel(11); break;
- }
}
}