12#include <QtLocation/private/qgeotilespec_p.h>
66 if ((spec.
mapId() == 2) || (spec.
mapId() == 12) || (spec.
mapId() == 21)) {
68 }
else if ((spec.
mapId() >= 7 && spec.
mapId() <= 11)
69 || (spec.
mapId() == 14)
70 || (spec.
mapId() == 16)
71 || (spec.
mapId() == 18)
72 || (spec.
mapId() == 20)) {
76 QString rawRequest = getRequestString(spec, ppi);
79 tr(
"Mapping manager no longer exists"),
this);
97 static const QString http(
"http://");
98 static const QString path(
"/maptile/2.1/maptile/newest/");
99 static const QChar slash(
'/');
104 if (isAerialType(mapScheme))
109 requestString +=
path;
110 requestString += mapScheme;
111 requestString += slash;
113 requestString += slash;
115 requestString += slash;
117 requestString += slash;
118 requestString += ((ppi > 72)) ? sizeToStr(m_tileSize * 2) : sizeToStr(m_tileSize);
119 static const QString slashpng(
"/png8");
120 requestString += slashpng;
123 requestString +=
"?token=";
124 requestString += m_token;
126 requestString +=
"&app_id=";
127 requestString += m_applicationId;
132 requestString +=
"&lg=";
133 requestString += getLanguageString();
134 return requestString;
137QString QGeoTileFetcherNokia::getLanguageString()
const
150 switch (
locale.language()) {
212 return m_applicationId;
219 "loadCopyrightsDescriptorsFromJson",
231 "parseNewVersionInfo",
244 copyrightUrl +=
QStringLiteral(
"/maptile/2.1/copyright/newest?output=json");
246 if (!
token().isEmpty()) {
248 copyrightUrl +=
token();
257 m_copyrightsReply = m_networkManager->
get(netRequest);
279 if (!
token().isEmpty()) {
281 versionUrl +=
token();
290 m_versionReply = m_networkManager->
get(netRequest);
QLocale locale() const
Returns the locale used to hint to this mapping manager about what language to use for map labels.
virtual QNetworkReply * get(const QNetworkRequest &request)=0
QString applicationId() const
QGeoTiledMapReply * getTileImage(const QGeoTileSpec &spec) override
void fetchCopyrightsData()
QGeoTileFetcherNokia(const QVariantMap ¶meters, QGeoNetworkAccessManager *networkManager, QGeoTiledMappingManagerEngineNokia *engine, const QSize &tileSize, int ppi)
QString getScheme(int mapId) const
QString getCurrentHost() const
QByteArray readAll()
Reads all remaining data from the device, and returns it as a byte array.
QString errorString() const
Returns a human-readable description of the last device error that occurred.
@ TraditionalChineseScript
T value(const Key &key, const T &defaultValue=T()) const
The QNetworkReply class contains the data and headers for a request sent with QNetworkAccessManager.
NetworkError error() const
Returns the error that was found during the processing of this request.
void finished()
This signal is emitted when the reply has finished processing.
The QNetworkRequest class holds a request to be sent with QNetworkAccessManager.
@ HttpPipeliningAllowedAttribute
void setAttribute(Attribute code, const QVariant &value)
Sets the attribute associated with code code to be value value.
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
void setParent(QObject *parent)
Makes the object a child of parent.
void deleteLater()
\threadsafe
\macro QT_RESTRICTED_CAST_FROM_ASCII
bool startsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the string starts with s; otherwise returns false.
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
QString toString() const
Returns the variant as a QString if the variant has a userType() including, but not limited to:
Q_QML_PRIVATE_EXPORT QV4::ReturnedValue locale(QV4::ExecutionEngine *engine, const QString &localeName)
Provides locale specific properties and formatted data.
Combined button and popup list for selecting options.
bool isAerialType(const QString mapScheme)
QString sizeToStr(int size)
static QT_BEGIN_NAMESPACE const int tileSize
constexpr const T & qMax(const T &a, const T &b)
#define Q_ARG(Type, data)
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLsizei const GLchar *const * path
#define QStringLiteral(str)
const QString MAP_TILES_HOST
const QString MAP_TILES_HOST_AERIAL