[Marble-commits] KDE/kdeedu/marble/src/lib/geodata
Torsten Rahn
tackat at kde.org
Thu Jul 30 18:16:12 CEST 2009
SVN commit 1004625 by rahn:
Adds support for the OGC KML namespace. So far we only supported the Google Earth namespace.
Reviewed-by: Patrick Spendrin
M +1 -0 handlers/kml/KmlElementDictionary.cpp
M +4 -1 handlers/kml/KmlElementDictionary.h
M +2 -1 parser/GeoDataParser.cpp
--- trunk/KDE/kdeedu/marble/src/lib/geodata/handlers/kml/KmlElementDictionary.cpp #1004624:1004625
@@ -31,6 +31,7 @@
const char* kmlTag_nameSpace20 = "http://earth.google.com/kml/2.0";
const char* kmlTag_nameSpace21 = "http://earth.google.com/kml/2.1";
const char* kmlTag_nameSpace22 = "http://earth.google.com/kml/2.2";
+const char* kmlTag_nameSpaceOgc22 = "http://www.opengis.net/kml/2.2";
const char* kmlTag_address = "address";
const char* kmlTag_AddressDetails = "AddressDetails";
--- trunk/KDE/kdeedu/marble/src/lib/geodata/handlers/kml/KmlElementDictionary.h #1004624:1004625
@@ -31,6 +31,7 @@
extern const char* kmlTag_nameSpace20;
extern const char* kmlTag_nameSpace21;
extern const char* kmlTag_nameSpace22;
+ extern const char* kmlTag_nameSpaceOgc22;
extern const char* kmlTag_address;
extern const char* kmlTag_AddressDetails;
@@ -188,11 +189,13 @@
#define KML_DEFINE_TAG_HANDLER_20(Name) GEODATA_DEFINE_TAG_HANDLER(kml, Kml, Name, kmlTag_nameSpace20)
#define KML_DEFINE_TAG_HANDLER_21(Name) GEODATA_DEFINE_TAG_HANDLER(kml, Kml, Name, kmlTag_nameSpace21)
#define KML_DEFINE_TAG_HANDLER_22(Name) GEODATA_DEFINE_TAG_HANDLER(kml, Kml, Name, kmlTag_nameSpace22)
+#define KML_DEFINE_TAG_HANDLER_OGC22(Name) GEODATA_DEFINE_TAG_HANDLER(kml, Kml, Name, kmlTag_nameSpaceOgc22)
#define KML_DEFINE_TAG_HANDLER(Name) \
KML_DEFINE_TAG_HANDLER_20(Name) \
KML_DEFINE_TAG_HANDLER_21(Name) \
- KML_DEFINE_TAG_HANDLER_22(Name)
+ KML_DEFINE_TAG_HANDLER_22(Name) \
+ KML_DEFINE_TAG_HANDLER_OGC22(Name)
}
--- trunk/KDE/kdeedu/marble/src/lib/geodata/parser/GeoDataParser.cpp #1004624:1004625
@@ -98,7 +98,8 @@
case GeoData_KML:
return (namespaceUri() == kml::kmlTag_nameSpace20 ||
namespaceUri() == kml::kmlTag_nameSpace21 ||
- namespaceUri() == kml::kmlTag_nameSpace22);
+ namespaceUri() == kml::kmlTag_nameSpace22 ||
+ namespaceUri() == kml::kmlTag_nameSpaceOgc22);
case GeoData_OSM:
//always "valid" because there is no namespace
return true;
More information about the Marble-commits
mailing list