Marble

KmlStyleMapTagWriter.cpp
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2010 Dennis Nienhüser <nienhueser@kde.org>
4//
5
6#include "KmlStyleMapTagWriter.h"
7
8#include "GeoDataStyleMap.h"
9#include "GeoDataTypes.h"
10#include "GeoWriter.h"
11#include "KmlElementDictionary.h"
12#include "KmlObjectTagWriter.h"
13
14namespace Marble
15{
16
17static GeoTagWriterRegistrar s_writerStyleMap(
18 GeoTagWriter::QualifiedName( GeoDataTypes::GeoDataStyleMapType,
19 kml::kmlTag_nameSpaceOgc22 ),
20 new KmlStyleMapTagWriter );
21
22bool KmlStyleMapTagWriter::write( const GeoNode *node, GeoWriter& writer ) const
23{
24 const GeoDataStyleMap *map = static_cast<const GeoDataStyleMap*>( node );
25
26 writer.writeStartElement( kml::kmlTag_StyleMap );
27 KmlObjectTagWriter::writeIdentifiers( writer, map );
28
30 while ( iter.hasNext() ) {
31 iter.next();
32 writer.writeStartElement( kml::kmlTag_Pair );
33 writer.writeElement( kml::kmlTag_key, iter.key() );
34 writer.writeElement( kml::kmlTag_styleUrl, iter.value() );
35 writer.writeEndElement();
36 }
37
38 writer.writeEndElement();
39
40 return true;
41}
42
43}
QPair< QString, QString > QualifiedName
Object Name and Namespace Pair This type is intended to be used in a similar way to.
Binds a QML item to a specific geodetic location in screen coordinates.
QFuture< void > map(Iterator begin, Iterator end, MapFunctor &&function)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:18:17 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.