Marble
7 #include "KmlNdTagHandler.h"
10 #include "KmlElementDictionary.h"
11 #include "GeoDataExtendedData.h"
12 #include "GeoDataGeometry.h"
13 #include "GeoDataPlacemark.h"
14 #include "GeoDataLineString.h"
15 #include "GeoDataLinearRing.h"
16 #include "GeoDataPolygon.h"
17 #include "GeoDataPoint.h"
18 #include "osm/OsmPlacemarkData.h"
27 KML_DEFINE_TAG_HANDLER_MX( nd )
29 GeoNode* KmlndTagHandler::parse( GeoParser& parser )
const
31 int ndIndex = parser.attribute(
"index" ).toInt();
41 if( parser.parentElement().represents( kmlTag_OsmPlacemarkData ) && parser.parentElement( 2 ).is<GeoDataPlacemark>() ) {
42 GeoDataPlacemark *placemark = parser.parentElement( 2 ).nodeAs<GeoDataPlacemark>();
43 if (
auto lineString = geodata_cast<GeoDataLineString>(placemark->geometry())) {
45 GeoDataPoint *point =
new GeoDataPoint( lineString->at( ndIndex ) );
61 else if ( parser.parentElement().represents( kmlTag_OsmPlacemarkData ) && parser.parentElement( 1 ).is<GeoDataLinearRing>() ) {
62 GeoDataLinearRing *linearRing = parser.parentElement( 1 ).nodeAs<GeoDataLinearRing>();
65 GeoDataPoint *point =
new GeoDataPoint( linearRing->at( ndIndex ) );
Binds a QML item to a specific geodetic location in screen coordinates.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Oct 2 2023 03:52:08 by
doxygen 1.8.17 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.