marble
OpenRouteServiceRunner.cpp
Go to the documentation of this file.
54 QHash<QString, QVariant> settings = route->routingProfile().pluginSettings()["openrouteservice"];
135 result += "<xls:XLS xmlns:xls=\"http://www.opengis.net/xls\" xmlns:sch=\"http://www.ascc.net/xml/schematron\" ";
136 result += "xmlns:gml=\"http://www.opengis.net/gml\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" ";
139 result += "http://schemas.opengis.net/ols/1.1.0/RouteService.xsd\" version=\"1.1\" xls:lang=\"en\">\n";
144 QString OpenRouteServiceRunner::requestHeader( const QString &unit, const QString &routePreference )
146 QString result = "<xls:Request methodName=\"RouteRequest\" requestID=\"123456789\" version=\"1.1\">\n";
154 QString OpenRouteServiceRunner::requestPoint( PointType pointType, const GeoDataCoordinates &coordinates )
164 result = result.arg( pointType == StartPoint ? "StartPoint" : ( pointType == ViaPoint ? "ViaPoint" : "EndPoint" ) );
226 QRegExp regexp = QRegExp( "^(.*) Please Check your Position: (-?[0-9]+.[0-9]+) (-?[0-9]+.[0-9]+) !" );
240 // QString message = tr( "Sorry, a problem occurred when calculating the route. Try adjusting start and destination points." );
241 // QPointer<QMessageBox> messageBox = new QMessageBox( QMessageBox::Warning, "Route Error", message );
279 qreal totalDistance = distance.item( 0 ).attributes().namedItem( "value" ).nodeValue().toDouble();
326 QDomNodeList instructions = instructionList.item( 0 ).toElement().elementsByTagName( "xls:RouteInstruction" );
368 QString const instructionText = turnType == RoutingInstruction::Unknown ? text : RoutingInstruction::generateRoadInstruction( turnType, road );
381 RoutingInstruction::TurnType OpenRouteServiceRunner::parseTurnType( const QString &text, QString *road )
383 QRegExp syntax( "^(Go|Drive) (half left|left|sharp left|straight forward|half right|right|sharp right)( on )?(.*)?$", Qt::CaseSensitive, QRegExp::RegExp2 );
OpenRouteServiceRunner(QObject *parent=0)
Definition: OpenRouteServiceRunner.cpp:32
void setInterval(int msec)
QDomNodeList elementsByTagName(const QString &tagname) const
QString cap(int nth) const
QDomNode item(int index) const
A container for Features, Styles and in the future Schemas.
Definition: GeoDataDocument.h:65
int length() const
QString nodeValue() const
QStringList split(const QString &sep, SplitBehavior behavior, Qt::CaseSensitivity cs) const
const T & at(int i) const
GeoDataCoordinates destination() const
The last point, or a default constructed if empty.
Definition: RouteRequest.cpp:140
QDomElement documentElement() const
QString & remove(int position, int n)
double toDouble(bool *ok) const
int size() const
const QString nameString(const QString &name, qreal length, const QTime &duration) const
Definition: RoutingRunner.cpp:55
static QString generateRoadInstruction(TurnType turnType, const QString &roadName)
Definition: RoutingInstruction.cpp:357
QDomElement toElement() const
int indexIn(const QString &str, int offset, CaretMode caretMode) const
~OpenRouteServiceRunner()
Definition: OpenRouteServiceRunner.cpp:40
const char * name() const
RoutingProfile routingProfile() const
Definition: RouteRequest.cpp:321
int count() const
void append(const T &value)
QString text() const
int exec(QFlags< QEventLoop::ProcessEventsFlag > flags)
QStringList capturedTexts() const
QNetworkReply * post(const QNetworkRequest &request, QIODevice *data)
bool isFinished() const
bool isEmpty() const
QByteArray readAll()
const GeoDataExtendedData routeData(qreal length, const QTime &duration) const
Definition: RoutingRunner.cpp:61
void deleteLater()
virtual void retrieveRoute(const RouteRequest *request)
Start a route download orw calculation.
Definition: OpenRouteServiceRunner.cpp:45
QDomNode namedItem(const QString &name) const
void setHeader(KnownHeaders header, const QVariant &value)
const QHash< QString, QHash< QString, QVariant > > & pluginSettings() const
Definition: RoutingProfile.cpp:33
void routeCalculated(GeoDataDocument *route)
Route download/calculation is finished, result in the given route object.
QByteArray toLatin1() const
Definition: RoutingRunner.h:28
void start(int msec)
bool contains(const Key &key) const
int size() const
uint length() const
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
QDomNamedNodeMap attributes() const
GeoDataCoordinates source() const
The first point, or a default constructed if empty.
Definition: RouteRequest.cpp:131
QDomNode at(int index) const
bool setContent(const QByteArray &data, bool namespaceProcessing, QString *errorMsg, int *errorLine, int *errorColumn)
void setSingleShot(bool singleShot)
GeoDataCoordinates at(int index) const
Accessor for the n-th position.
Definition: RouteRequest.cpp:149
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:41 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:41 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.