marble
MapQuestRunner.cpp
Go to the documentation of this file.
63 QString url = "http://open.mapquestapi.com/directions/v1/route?callback=renderAdvancedNarrative&outFormat=xml&narrativeType=text&shapeFormat=raw&generalize=0";
65 append( &url, "from", QString::number( route->source().latitude( degree ), 'f', 6 ) + ',' + QString::number( route->source().longitude( degree ), 'f', 6 ) );
67 append( &url, "to", QString::number( route->at( i ).latitude( degree ), 'f', 6 ) + ',' + QString::number( route->at( i ).longitude( degree ), 'f', 6 ) );
70 QString const unit = MarbleGlobal::getInstance()->locale()->measurementSystem() == MarbleLocale::MetricSystem ? "k" : "m";
87 if ( !settings["ascending"].toString().isEmpty() && !settings["descending"].toString().isEmpty() ) {
123 m_request.setRawHeader( "User-Agent", TinyWebBrowser::userAgent( "Browser", "MapQuestRunner" ) );
255 unsigned int const lastInstruction = qMax<int>( 0, instructions.length()-1 ); // ignore the last 'Welcome to xy' instruction
265 if ( textNodes.size() == 1 && maneuver.size() == 1 && points.size() == 1 && mapping.contains( i ) ) {
288 *lineString << GeoDataCoordinates( routeWaypoints->at( j ).longitude(), routeWaypoints->at( j ).latitude() );
Definition: Maneuver.h:34
void setInterval(int msec)
QDomNodeList elementsByTagName(const QString &tagname) const
QDomNode item(int index) const
A container for Features, Styles and in the future Schemas.
Definition: GeoDataDocument.h:65
Definition: Maneuver.h:33
void setQuery(const QString &txt)
bool contains(const Key &key) const
MarbleLocale::MeasurementSystem measurementSystem() const
Definition: MarbleLocale.cpp:45
void setUrl(const QUrl &url)
Definition: Maneuver.h:36
QDomElement documentElement() const
qreal latitude(GeoDataCoordinates::Unit unit=GeoDataCoordinates::Radian) const
retrieves the latitude of the GeoDataCoordinates object use the unit parameter to switch between Radi...
Definition: GeoDataCoordinates.cpp:751
Definition: Maneuver.h:43
double toDouble(bool *ok) const
QDomNodeList childNodes() const
Definition: Maneuver.h:30
void addEncodedQueryItem(const QByteArray &key, const QByteArray &value)
Definition: Maneuver.h:32
const QString nameString(const QString &name, qreal length, const QTime &duration) const
Definition: RoutingRunner.cpp:55
QDomElement toElement() const
const char * name() const
RoutingProfile routingProfile() const
Definition: RouteRequest.cpp:321
QString number(int n, int base)
virtual void retrieveRoute(const RouteRequest *request)
Start a route download orw calculation.
Definition: MapQuestRunner.cpp:50
QString text() const
int exec(QFlags< QEventLoop::ProcessEventsFlag > flags)
int toInt(bool *ok, int base) const
bool isFinished() const
QByteArray readAll()
QTime addSecs(int s) const
Definition: Maneuver.h:31
const GeoDataExtendedData routeData(qreal length, const QTime &duration) const
Definition: RoutingRunner.cpp:61
void deleteLater()
const T value(const Key &key) const
QDomNode namedItem(const QString &name) const
qreal longitude(GeoDataCoordinates::Unit unit=GeoDataCoordinates::Radian) const
retrieves the longitude of the GeoDataCoordinates object use the unit parameter to switch between Rad...
Definition: GeoDataCoordinates.cpp:739
Definition: Maneuver.h:28
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.
MapQuestRunner(QObject *parent=0)
Definition: MapQuestRunner.cpp:36
Definition: RoutingRunner.h:28
void setRawHeader(const QByteArray &headerName, const QByteArray &headerValue)
Definition: Maneuver.h:29
void start(int msec)
static QByteArray userAgent(const QString &platform, const QString &plugin)
Definition: TinyWebBrowser.cpp:106
QNetworkReply * get(const QNetworkRequest &request)
Definition: Maneuver.h:27
Definition: Maneuver.h:37
int size() const
uint length() const
Definition: Maneuver.h:35
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
GeoDataCoordinates source() const
The first point, or a default constructed if empty.
Definition: RouteRequest.cpp:131
int size() const
QDomNode at(int index) const
bool setContent(const QByteArray &data, bool namespaceProcessing, QString *errorMsg, int *errorLine, int *errorColumn)
Definition: Maneuver.h:42
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:40 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:40 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.