12#include <QtLocation/private/qgeotilespec_p.h>
38 return mapScheme.startsWith(
"satellite") || mapScheme.startsWith(
"hybrid") || mapScheme.startsWith(
"terrain");
65 if ((spec.
mapId() == 2) || (spec.
mapId() == 12) || (spec.
mapId() == 21)) {
67 }
else if ((spec.
mapId() >= 7 && spec.
mapId() <= 11)
68 || (spec.
mapId() == 14)
69 || (spec.
mapId() == 16)
70 || (spec.
mapId() == 18)
71 || (spec.
mapId() == 20)) {
75 QString rawRequest = getRequestString(spec, ppi);
76 if (rawRequest.isEmpty()) {
78 tr(
"Mapping manager no longer exists"),
this);
96 static const QString http(
"https://");
97 static const QString path(
"/maptile/2.1/maptile/newest/");
98 static const QChar slash(
'/');
103 if (isAerialType(mapScheme))
108 requestString +=
path;
109 requestString += mapScheme;
110 requestString += slash;
112 requestString += slash;
114 requestString += slash;
116 requestString += slash;
117 requestString += ((ppi > 72)) ? sizeToStr(m_tileSize * 2) : sizeToStr(m_tileSize);
118 static const QString slashpng(
"/png8");
119 requestString += slashpng;
122 requestString +=
"?apiKey=";
123 requestString += m_apiKey;
128 requestString +=
"&lg=";
129 requestString += getLanguageString();
130 return requestString;
133QString QGeoTileFetcherNokia::getLanguageString()
const
146 switch (
locale.language()) {
210 "loadCopyrightsDescriptorsFromJson",
222 "parseNewVersionInfo",
235 copyrightUrl +=
QStringLiteral(
"/maptile/2.1/copyright/newest?output=json");
237 if (!
apiKey().isEmpty()) {
243 m_copyrightsReply = m_networkManager->
get(netRequest);
265 if (!
apiKey().isEmpty()) {
271 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
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
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
T * data() const noexcept
\macro QT_RESTRICTED_CAST_FROM_ASCII
bool isEmpty() const noexcept
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_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