summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Nienhüser <nienhueser@kde.org>2016-08-09 17:50:35 (GMT)
committerDennis Nienhüser <nienhueser@kde.org>2016-08-09 17:51:17 (GMT)
commitea73532eb1ca715d57cc184dcc5fabda9adaab6e (patch)
tree3633110981115eac5f045620b28a11bc96d62db4
parent444caef19e0c9bc5d7524d5feb3151a10bf4f0a8 (diff)
Also initialize LinearRing type geometry
-rw-r--r--src/lib/marble/osm/OsmObjectManager.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/lib/marble/osm/OsmObjectManager.cpp b/src/lib/marble/osm/OsmObjectManager.cpp
index dfb9cf0..efdbd46 100644
--- a/src/lib/marble/osm/OsmObjectManager.cpp
+++ b/src/lib/marble/osm/OsmObjectManager.cpp
@@ -50,6 +50,20 @@ void OsmObjectManager::initializeOsmData( GeoDataPlacemark* placemark )
}
}
+ // Assigning osmData to each of the line's nodes ( if they don't already have data )
+ if ( placemark->geometry()->nodeType() == GeoDataTypes::GeoDataLinearRingType ) {
+ const GeoDataLinearRing* lineString = static_cast<GeoDataLinearRing*>( placemark->geometry() );
+ for (auto it =lineString->constBegin(), end = lineString->constEnd(); it != end; ++it ) {
+ if ( !osmData.containsNodeReference( *it ) ) {
+ OsmPlacemarkData osmNdData;
+ osmNdData.setId( --m_minId );
+ osmNdData.setAction( "modify" );
+ osmNdData.setVisible( "false" );
+ osmData.addNodeReference( *it, osmNdData );
+ }
+ }
+ }
+
// Assigning osmData to each of the polygons boundaries, and to each of the
// nodes that are part of those boundaries ( if they don't already have data )
if ( placemark->geometry()->nodeType() == GeoDataTypes::GeoDataPolygonType ) {