[Marble-commits] KDE/kdeedu/marble/src/lib/geodata
Thibaut Gridel
tgridel at free.fr
Wed Sep 9 23:15:54 CEST 2009
SVN commit 1021711 by tgridel:
GPX Tag Handler: parse wpt tag into GeoDataPlacemark
M +1 -0 CMakeLists.txt
M +3 -0 handlers/gpx/GPXElementDictionary.cpp
M +3 -0 handlers/gpx/GPXElementDictionary.h
M +8 -6 handlers/gpx/GPXgpxTagHandler.cpp
A handlers/gpx/GPXwptTagHandler.cpp [License: LGPL (v2.1+)]
A handlers/gpx/GPXwptTagHandler.h [License: LGPL (v2.1+)]
--- trunk/KDE/kdeedu/marble/src/lib/geodata/CMakeLists.txt #1021710:1021711
@@ -22,6 +22,7 @@
SET( geodata_handlers_gpx_SRCS
geodata/handlers/gpx/GPXElementDictionary.cpp
geodata/handlers/gpx/GPXgpxTagHandler.cpp
+ geodata/handlers/gpx/GPXwptTagHandler.cpp
)
SET( geodata_handlers_osmnamefinder_SRCS
--- trunk/KDE/kdeedu/marble/src/lib/geodata/handlers/gpx/GPXElementDictionary.cpp #1021710:1021711
@@ -32,6 +32,9 @@
const char* gpxTag_nameSpace11 = "http://www.topografix.com/GPX/1/1";
const char* gpxTag_gpx = "gpx";
+const char* gpxTag_lat = "lat";
+const char* gpxTag_lon = "lon";
+const char* gpxTag_wpt = "wpt";
}
}
--- trunk/KDE/kdeedu/marble/src/lib/geodata/handlers/gpx/GPXElementDictionary.h #1021710:1021711
@@ -33,6 +33,9 @@
extern const char* gpxTag_nameSpace11;
extern const char* gpxTag_gpx;
+ extern const char* gpxTag_lat;
+ extern const char* gpxTag_lon;
+ extern const char* gpxTag_wpt;
// TODO: add all remaining tags!
}
--- trunk/KDE/kdeedu/marble/src/lib/geodata/handlers/gpx/GPXgpxTagHandler.cpp #1021710:1021711
@@ -24,8 +24,10 @@
#include <QtCore/QDebug>
#include "GPXElementDictionary.h"
-#include "GeoParser.h"
+#include "GeoDataParser.h"
+#include "GeoDataDocument.h"
+
namespace Marble
{
namespace gpx
@@ -34,11 +36,11 @@
GeoNode* GPXgpxTagHandler::parse(GeoParser& parser) const
{
- Q_UNUSED(parser); // Don't complain when asserts are turned off
- Q_ASSERT(parser.isStartElement() && parser.isValidElement(gpxTag_gpx));
-
- qDebug() << "Parsed <Document> start!";
- return 0;
+ GeoDataDocument* doc = geoDataDoc( parser );
+//#ifdef DEBUG_TAGS
+ qDebug() << "Parsed <" << gpxTag_gpx << "> document: " << doc;
+//#endif
+ return doc;
}
}
More information about the Marble-commits
mailing list