summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorsten Rahn <rahn@kde.org>2016-07-17 21:50:32 (GMT)
committerTorsten Rahn <trahn@testo.de>2016-07-17 21:51:59 (GMT)
commit25811c29977c8f1bc6a07218e8f1edf544e7a6ed (patch)
treee3a6f0b596a6cbf45f07c4b5a4e7c4545655c9f4
parentc3d7ab14c2953fcbabf42fb7605ae230fa9220cc (diff)
Render "leisure=marina" (see e.g. Yachthafen Fahrensodde)
-rw-r--r--src/lib/marble/PlacemarkLayout.cpp1
-rw-r--r--src/lib/marble/StyleBuilder.cpp5
-rw-r--r--src/lib/marble/declarative/Placemark.cpp1
-rw-r--r--src/lib/marble/geodata/data/GeoDataFeature.h1
-rw-r--r--src/lib/marble/osm/OsmPresetLibrary.cpp1
-rw-r--r--src/plugins/runner/osm/OsmWay.cpp6
6 files changed, 13 insertions, 2 deletions
diff --git a/src/lib/marble/PlacemarkLayout.cpp b/src/lib/marble/PlacemarkLayout.cpp
index 43fa762..9988894 100644
--- a/src/lib/marble/PlacemarkLayout.cpp
+++ b/src/lib/marble/PlacemarkLayout.cpp
@@ -93,6 +93,7 @@ QSet<GeoDataFeature::GeoDataVisualCategory> acceptedVisualCategories()
<< GeoDataFeature::GeographicPole
<< GeoDataFeature::MagneticPole
<< GeoDataFeature::ShipWreck
+ << GeoDataFeature::LeisureMarina
<< GeoDataFeature::AirPort
<< GeoDataFeature::Observatory
<< GeoDataFeature::AccomodationCamping
diff --git a/src/lib/marble/StyleBuilder.cpp b/src/lib/marble/StyleBuilder.cpp
index 57db4fc..c13983b 100644
--- a/src/lib/marble/StyleBuilder.cpp
+++ b/src/lib/marble/StyleBuilder.cpp
@@ -124,6 +124,7 @@ StyleBuilder::Private::Private() :
m_defaultMinZoomLevels[GeoDataFeature::MilitaryDangerArea] = 11;
+ m_defaultMinZoomLevels[GeoDataFeature::LeisureMarina] = 13;
m_defaultMinZoomLevels[GeoDataFeature::LeisurePark] = 11;
m_defaultMinZoomLevels[GeoDataFeature::LeisurePlayground] = 11;
m_defaultMinZoomLevels[GeoDataFeature::LanduseAllotments] = 11;
@@ -668,6 +669,7 @@ void StyleBuilder::Private::initializeDefaultStyles()
m_defaultStyle[GeoDataFeature::NaturalHeath] = StyleBuilder::Private::createWayStyle( "#d6d99f", QColor("#d6d99f").darker(150), true, false );
m_defaultStyle[GeoDataFeature::LeisureGolfCourse] = StyleBuilder::Private::createWayStyle( QColor("#b5e3b5"), QColor("#b5e3b5").darker(150), true, true );
+ m_defaultStyle[GeoDataFeature::LeisureMarina] = StyleBuilder::Private::createOsmPOIStyle( osmFont, QString(), QColor("#95abd5"), QColor("#aec8d1"), QColor("#95abd5").darker(150) );
m_defaultStyle[GeoDataFeature::LeisurePark] = StyleBuilder::Private::createWayStyle( QColor("#c8facc"), QColor("#c8facc").darker(150), true, true );
m_defaultStyle[GeoDataFeature::LeisurePlayground] = StyleBuilder::Private::createOsmPOIStyle( osmFont, "amenity/playground.16", amenityColor, "#CCFFF1", "#BDFFED" );
m_defaultStyle[GeoDataFeature::LeisurePitch] = StyleBuilder::Private::createWayStyle( "#8ad3af", QColor("#8ad3af").darker(150), true, true );
@@ -1060,6 +1062,7 @@ QStringList StyleBuilder::renderOrder() const
paintLayerOrder << Private::createPaintLayerItem("LineString", GeoDataFeature::NaturalReef, "outline");
paintLayerOrder << Private::createPaintLayerItem("LineString", GeoDataFeature::NaturalReef, "inline");
paintLayerOrder << Private::createPaintLayerItem("LineString", GeoDataFeature::NaturalReef, "label");
+ paintLayerOrder << Private::createPaintLayerItem("Polygon", GeoDataFeature::LeisureMarina);
for ( int i = GeoDataFeature::HighwaySteps; i <= GeoDataFeature::HighwayMotorway; i++ ) {
@@ -1100,6 +1103,7 @@ QStringList StyleBuilder::renderOrder() const
paintLayerOrder << Private::createPaintLayerItem("Point", GeoDataFeature::NaturalGlacier);
paintLayerOrder << Private::createPaintLayerItem("Point", GeoDataFeature::NaturalIceShelf);
paintLayerOrder << Private::createPaintLayerItem("Point", GeoDataFeature::NaturalScrub);
+ paintLayerOrder << Private::createPaintLayerItem("Point", GeoDataFeature::LeisureMarina);
paintLayerOrder << Private::createPaintLayerItem("Point", GeoDataFeature::LeisurePark);
paintLayerOrder << Private::createPaintLayerItem("Point", GeoDataFeature::LeisurePlayground);
paintLayerOrder << Private::createPaintLayerItem("Point", GeoDataFeature::LeisurePitch);
@@ -1377,6 +1381,7 @@ QString StyleBuilder::visualCategoryName(GeoDataFeature::GeoDataVisualCategory c
visualCategoryNames[GeoDataFeature::ReligionShinto] = "ReligionShinto";
visualCategoryNames[GeoDataFeature::ReligionSikh] = "ReligionSikh";
visualCategoryNames[GeoDataFeature::LeisureGolfCourse] = "LeisureGolfCourse";
+ visualCategoryNames[GeoDataFeature::LeisureMarina] = "LeisureMarina";
visualCategoryNames[GeoDataFeature::LeisurePark] = "LeisurePark";
visualCategoryNames[GeoDataFeature::LeisurePlayground] = "LeisurePlayground";
visualCategoryNames[GeoDataFeature::LeisurePitch] = "LeisurePitch";
diff --git a/src/lib/marble/declarative/Placemark.cpp b/src/lib/marble/declarative/Placemark.cpp
index a5b7cd7..ae495a1 100644
--- a/src/lib/marble/declarative/Placemark.cpp
+++ b/src/lib/marble/declarative/Placemark.cpp
@@ -389,6 +389,7 @@ QString Placemark::categoryName(GeoDataFeature::GeoDataVisualCategory category)
case GeoDataFeature::ReligionShinto: return tr("Shinto");
case GeoDataFeature::ReligionSikh: return tr("Sikh");
case GeoDataFeature::LeisureGolfCourse: return tr("Golf Course");
+ case GeoDataFeature::LeisureMarina: return tr("Marina");
case GeoDataFeature::LeisurePark: return tr("Park");
case GeoDataFeature::LeisurePlayground: return tr("Playground");
case GeoDataFeature::LeisurePitch: return tr("Pitch");
diff --git a/src/lib/marble/geodata/data/GeoDataFeature.h b/src/lib/marble/geodata/data/GeoDataFeature.h
index 8335abe..25d1442 100644
--- a/src/lib/marble/geodata/data/GeoDataFeature.h
+++ b/src/lib/marble/geodata/data/GeoDataFeature.h
@@ -350,6 +350,7 @@ class GEODATA_EXPORT GeoDataFeature : public GeoDataObject
// OpenStreetMap category Leisure
LeisureGolfCourse,
+ LeisureMarina,
LeisurePark,
LeisurePlayground,
LeisurePitch,
diff --git a/src/lib/marble/osm/OsmPresetLibrary.cpp b/src/lib/marble/osm/OsmPresetLibrary.cpp
index 73a8b37..1786755 100644
--- a/src/lib/marble/osm/OsmPresetLibrary.cpp
+++ b/src/lib/marble/osm/OsmPresetLibrary.cpp
@@ -271,6 +271,7 @@ void OsmPresetLibrary::initializeOsmVisualCategories()
s_visualCategories[ OsmTag( "leisure", "common" ) ] = GeoDataFeature::LanduseGrass;
s_visualCategories[ OsmTag( "leisure", "garden" ) ] = GeoDataFeature::LanduseGrass;
s_visualCategories[ OsmTag( "leisure", "golf_course" ) ] = GeoDataFeature::LeisureGolfCourse;
+ s_visualCategories[ OsmTag( "leisure", "marina" ) ] = GeoDataFeature::LeisureMarina;
s_visualCategories[ OsmTag( "leisure", "park" ) ] = GeoDataFeature::LeisurePark;
s_visualCategories[ OsmTag( "leisure", "playground" ) ] = GeoDataFeature::LeisurePlayground;
s_visualCategories[ OsmTag( "leisure", "pitch" ) ] = GeoDataFeature::LeisurePitch;
diff --git a/src/plugins/runner/osm/OsmWay.cpp b/src/plugins/runner/osm/OsmWay.cpp
index bfc5cbc..4fc4c60 100644
--- a/src/plugins/runner/osm/OsmWay.cpp
+++ b/src/plugins/runner/osm/OsmWay.cpp
@@ -25,9 +25,10 @@ QSet<QString> OsmWay::s_areaTags;
void OsmWay::create(GeoDataDocument *document, const OsmNodes &nodes) const
{
bool const shouldRender =
- !m_osmData.containsTagKey("area:highway") &&
- !m_osmData.containsTag("boundary", "protected_area") &&
+ !m_osmData.containsTagKey("area:highway") && // Not supported yet
+ !m_osmData.containsTag("boundary", "protected_area") && // Not relevant for the default map
!m_osmData.containsTag("boundary", "postal_code") &&
+ !m_osmData.containsTag("boundary", "aerial_views") && // Created by OSM editor(s) application for digitalization
!m_osmData.containsTagKey("closed:highway") &&
!m_osmData.containsTagKey("abandoned:highway") &&
!m_osmData.containsTagKey("abandoned:natural") &&
@@ -148,6 +149,7 @@ bool OsmWay::isAreaTag(const QString &keyValue)
s_areaTags.insert( "leisure=common" );
s_areaTags.insert( "leisure=garden" );
s_areaTags.insert( "leisure=golf_course" );
+ s_areaTags.insert( "leisure=marina" );
s_areaTags.insert( "leisure=playground" );
s_areaTags.insert( "leisure=pitch" );
s_areaTags.insert( "leisure=park" );