Marble
8 #include "DgmlProjectionTagHandler.h"
11 #include "DgmlAttributeDictionary.h"
12 #include "DgmlElementDictionary.h"
13 #include "GeoParser.h"
14 #include "GeoSceneTileDataset.h"
22 GeoNode* DgmlProjectionTagHandler::parse( GeoParser& parser )
const
25 Q_ASSERT(parser.isStartElement() && parser.isValidElement(
QLatin1String(dgmlTag_Projection)));
28 GeoStackItem parentItem = parser.parentElement();
29 if ( !parentItem.represents( dgmlTag_Texture ) && !parentItem.represents( dgmlTag_Vectortile))
33 const QString nameStr = parser.attribute( dgmlAttr_name ).
trimmed();
35 GeoSceneAbstractTileProjection::Type tileProjectionType = GeoSceneAbstractTileProjection::Equirectangular;
37 tileProjectionType = GeoSceneAbstractTileProjection::Equirectangular;
39 tileProjectionType = GeoSceneAbstractTileProjection::Mercator;
41 parser.raiseWarning(
QString(
"Value not allowed for attribute name: %1" ).arg( nameStr ));
44 parentItem.nodeAs<GeoSceneTileDataset>()->setTileProjection(tileProjectionType);
QString trimmed() const const
bool isEmpty() const const
Binds a QML item to a specific geodetic location in screen coordinates.
Projection
This enum is used to choose the projection shown in the view.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Wed Oct 4 2023 04:09:41 by
doxygen 1.8.17 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.