Commit c22ed98e authored by Dennis Nienhüser's avatar Dennis Nienhüser Committed by Friedrich W. H. Kossebau
Browse files

Parse marbleZoomLevel=<int> osm tags as placemark zoomLevel values

parent 2d0441f9
......@@ -61,38 +61,43 @@ void OsmNode::create(GeoDataDocument *document) const
placemark->setVisualCategory(category);
placemark->setStyle( GeoDataStyle::Ptr() );
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;
case GeoDataPlacemark::AmenityBench:
case GeoDataPlacemark::AmenityWasteBasket:
placemark->setZoomLevel(19);
break;
default:
placemark->setZoomLevel(18);
break;
if (m_osmData.containsTagKey(QLatin1String("marbleZoomLevel"))) {
int const zoomLevel = m_osmData.tagValue(QLatin1String("marbleZoomLevel")).toInt();
placemark->setZoomLevel(zoomLevel);
} 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;
case GeoDataPlacemark::NaturalPeak:
placemark->setZoomLevel(11);
break;
case GeoDataPlacemark::AmenityBench:
case GeoDataPlacemark::AmenityWasteBasket:
placemark->setZoomLevel(19);
break;
default:
placemark->setZoomLevel(18);
break;
}
}
if (category >= GeoDataPlacemark::PlaceCity && category <= GeoDataPlacemark::PlaceVillageCapital) {
......
Supports Markdown
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