Subversion Repositories Projects

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
801 - 1
/***************************************************************************
2
 *   Copyright (C) 2009 by Manuel Schrape                                  *
3
 *   manuel.schrape@gmx.de                                                 *
4
 *                                                                         *
5
 *   This program is free software; you can redistribute it and/or modify  *
6
 *   it under the terms of the GNU General Public License as published by  *
7
 *   the Free Software Foundation; either version 2 of the License.        *
8
 *                                                                         *
9
 *   This program is distributed in the hope that it will be useful,       *
10
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
11
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
12
 *   GNU General Public License for more details.                          *
13
 *                                                                         *
14
 *   You should have received a copy of the GNU General Public License     *
15
 *   along with this program; if not, write to the                         *
16
 *   Free Software Foundation, Inc.,                                       *
17
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
18
 ***************************************************************************/
19
 
20
#include "HandlerKML.h"
21
 
22
HandlerKML::HandlerKML()
23
{
24
}
25
 
26
QString HandlerKML::get_Header(QString Name)
27
{
28
    QString block;
29
    block = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
30
            "<kml xmlns=\"http://earth.google.com/kml/2.2\">\n"
31
            "  <Document>\n"
32
            "    <name>" + Name + "</name>\n"
33
            "    <Style id=\"MK_gps-style\">\n"
34
            "      <LineStyle>\n"
35
            "        <color>ff0000ff</color>\n"
36
            "        <width>2</width>\n"
37
            "      </LineStyle>\n"
38
            "    </Style>\n"
39
            "    <Placemark>\n"
40
            "      <LookAt>\n"
41
            "        <range>400</range>\n"
42
            "        <tilt>45</tilt>\n"
43
            "      </LookAt>\n"
44
            "      <name>Flight</name>\n"
45
            "      <styleUrl>#MK_gps-style</styleUrl>\n"
46
            "      <LineString>\n"
47
            "        <extrude>1</extrude>\n"
48
            "        <tessellate>1</tessellate>\n"
49
            "        <altitudeMode>absolute</altitudeMode>\n"
50
            "        <coordinates>\n";
51
 
52
    return block;
53
}
54
 
55
QString HandlerKML::get_Footer()
56
{
57
    QString block;
58
    block = "        </coordinates>\n"
59
            "      </LineString>\n"
60
            "    </Placemark>\n"
61
            "  </Document>\n"
62
            "</kml>\n";
63
 
64
    return block;
65
}