Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qmapboxcommon.h
Go to the documentation of this file.
1// Copyright (C) 2017 Mapbox, Inc.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QMAPBOXAPICOMMON_H
5#define QMAPBOXAPICOMMON_H
6
7#include <QtCore/QString>
8#include <QtCore/QJsonObject>
9#include <QtPositioning/QGeoLocation>
10
12
13static const QString mapboxTilesApiPath = QStringLiteral("http://api.tiles.mapbox.com/v4/");
14
15// https://www.mapbox.com/api-documentation/#geocoding
16static const QString mapboxGeocodingApiPath = QStringLiteral("https://api.mapbox.com/geocoding/v5/mapbox.places/");
17static const QString mapboxGeocodingEnterpriseApiPath = QStringLiteral("https://api.mapbox.com/geocoding/v5/mapbox.places-permanent/");
18
19// https://www.mapbox.com/api-documentation/#directions
20static const QString mapboxDirectionsApiPath = QStringLiteral("https://api.mapbox.com/directions/v5/mapbox/");
21
22static const QByteArray mapboxDefaultUserAgent = QByteArrayLiteral("Qt Location based application");
23
24static const qreal mapboxDefaultRadius = 50000;
25
27{
28public:
29 static QString mapboxNameForCategory(const QString &category);
30 static QGeoLocation parseGeoLocation(const QJsonObject &response);
31};
32
33QT_END_NAMESPACE
34
35#endif // QMAPBOXAPICOMMON_H
static QString mapboxNameForCategory(const QString &category)
static QGeoLocation parseGeoLocation(const QJsonObject &response)
The QNetworkReply class contains the data and headers for a request sent with QNetworkAccessManager.
QObject * parent
Definition qobject.h:73
static const QByteArray mapboxDefaultUserAgent
static const QString mapboxGeocodingApiPath
static const QString mapboxGeocodingEnterpriseApiPath
static const qreal mapboxDefaultRadius
static const QString mapboxDirectionsApiPath
static QT_BEGIN_NAMESPACE const QString mapboxTilesApiPath
connect(manager, &QNetworkAccessManager::finished, this, &MyClass::replyFinished)