[Marble-commits] KDE/kdeedu/marble/src/lib/geodata/writers/kml
Dennis Nienhüser
earthwings at gentoo.org
Sat Oct 9 15:51:05 CEST 2010
SVN commit 1184228 by nienhueser:
Write styles and style maps for kml documents. Only supported style child is the linestyle so far. Write style uri of placemarks, if any.
M +9 -0 KmlDocumentTagWriter.cpp
A KmlLineStyleTagWriter.cpp [License: LGPL]
A KmlLineStyleTagWriter.h [License: LGPL]
M +1 -0 KmlPlacemarkTagWriter.cpp
A KmlStyleMapTagWriter.cpp [License: LGPL]
A KmlStyleMapTagWriter.h [License: LGPL]
A KmlStyleTagWriter.cpp [License: LGPL]
A KmlStyleTagWriter.h [License: LGPL]
--- trunk/KDE/kdeedu/marble/src/lib/geodata/writers/kml/KmlDocumentTagWriter.cpp #1184227:1184228
@@ -15,6 +15,8 @@
#include "GeoWriter.h"
#include "KmlElementDictionary.h"
#include "GeoDataObject.h"
+#include "GeoDataStyle.h"
+#include "GeoDataStyleMap.h"
#include "MarbleDebug.h"
#include "GeoDataTypes.h"
@@ -32,6 +34,13 @@
{
const GeoDataDocument &document = static_cast<const GeoDataDocument&>(node);
+ foreach( const GeoDataStyle &style, document.styles() ) {
+ writeElement( style, writer );
+ }
+ foreach( const GeoDataStyleMap &map, document.styleMaps() ) {
+ writeElement( map, writer );
+ }
+
writer.writeStartElement( kml::kmlTag_Document );
writer.writeOptionalElement( "name", document.name() );
writer.writeOptionalElement( "address", document.address() );
--- trunk/KDE/kdeedu/marble/src/lib/geodata/writers/kml/KmlPlacemarkTagWriter.cpp #1184227:1184228
@@ -35,6 +35,7 @@
writer.writeStartElement( kml::kmlTag_Placemark );
writer.writeOptionalElement( "name", placemark.name() );
+ writer.writeOptionalElement( kml::kmlTag_styleUrl, placemark.styleUrl() );
if( !placemark.description().isEmpty() ) {
writer.writeStartElement( "description" );
More information about the Marble-commits
mailing list