~ubuntu-branches/ubuntu/wily/marble/wily-proposed

« back to all changes in this revision

Viewing changes to src/lib/marble/geodata/writers/kml/KmlPointTagWriter.cpp

  • Committer: Package Import Robot
  • Author(s): Scarlett Clark, Jonathan Riddell, Scarlett Clark
  • Date: 2014-07-24 23:38:32 UTC
  • mfrom: (1.5.2)
  • Revision ID: package-import@ubuntu.com-20140724233832-7v4421t4khrhw487
Tags: 4:4.13.90-0ubuntu1
[ Jonathan Riddell ]
* Switch to libmarblewidget19 for new soversion

[ Scarlett Clark ]
* New upstream beta release
* Update: do_not_install_private_headers. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
// the source code.
7
7
//
8
8
// Copyright 2009      Andrew Manson <g.real.ate@gmail.com>
 
9
// Copyright 2014      Marek Hakala <hakala.marek@gmail.com>
9
10
//
10
11
 
11
12
#include "KmlPointTagWriter.h"
14
15
#include "GeoDataTypes.h"
15
16
#include "GeoWriter.h"
16
17
#include "KmlElementDictionary.h"
 
18
#include "KmlGroundOverlayWriter.h"
 
19
#include "KmlObjectTagWriter.h"
17
20
 
18
21
namespace Marble
19
22
{
20
23
 
21
24
static GeoTagWriterRegistrar s_writerPoint( GeoTagWriter::QualifiedName(GeoDataTypes::GeoDataPointType,
22
 
                                                                            kml::kmlTag_nameSpace22),
 
25
                                                                            kml::kmlTag_nameSpaceOgc22),
23
26
                                               new KmlPointTagWriter() );
24
27
 
25
28
 
28
31
{
29
32
    const GeoDataPoint *point = static_cast<const GeoDataPoint*>(node);
30
33
 
 
34
    if ( !point->coordinates().isValid() ){
 
35
        return true;
 
36
    }
 
37
 
31
38
    writer.writeStartElement( kml::kmlTag_Point );
32
 
 
 
39
    KmlObjectTagWriter::writeIdentifiers( writer, point );
 
40
    writer.writeOptionalElement( kml::kmlTag_extrude, QString::number( point->extrude() ), "0" );
33
41
    writer.writeStartElement("coordinates");
34
42
 
35
43
    QString coordinateString;
47
55
    }
48
56
 
49
57
    writer.writeCharacters( coordinateString );
50
 
 
51
58
    writer.writeEndElement();
 
59
 
 
60
    KmlGroundOverlayWriter::writeAltitudeMode( writer, point->altitudeMode() );
 
61
 
52
62
    writer.writeEndElement();
53
63
 
54
64
    return true;