8#include <QtCore/qstandardpaths.h>
9#include <QtLocation/private/qabstractgeotilecache_p.h>
10#include <QtLocation/private/qgeocameracapabilities_p.h>
11#include <QtLocation/private/qgeomaptype_p.h>
45 m_settings.setApiBaseUrl(apiBaseUrl);
49 metadata[
"isHTTPS"] =
true;
51 if (m_useChinaEndpoint) {
55 tr(
"China Streets"),
false,
false, ++mapId, pluginName, cameraCaps, metadata);
57 tr(
"China Light"),
false,
false, ++mapId, pluginName, cameraCaps, metadata);
59 tr(
"China Dark"),
false,
false, ++mapId, pluginName, cameraCaps, metadata);
62 tr(
"Streets"),
false,
false, ++mapId, pluginName, cameraCaps, metadata);
64 tr(
"Basic"),
false,
false, ++mapId, pluginName, cameraCaps, metadata);
66 tr(
"Bright"),
false,
false, ++mapId, pluginName, cameraCaps, metadata);
68 tr(
"Outdoors"),
false,
false, ++mapId, pluginName, cameraCaps, metadata);
70 tr(
"Satellite"),
false,
false, ++mapId, pluginName, cameraCaps, metadata);
72 tr(
"Satellite Streets"),
false,
false, ++mapId, pluginName, cameraCaps, metadata);
74 tr(
"Light"),
false,
false, ++mapId, pluginName, cameraCaps, metadata);
76 tr(
"Dark"),
false,
false, ++mapId, pluginName, cameraCaps, metadata);
78 tr(
"Navigation Preview Day"),
false,
false, ++mapId, pluginName, cameraCaps, metadata);
80 tr(
"Navigation Preview Night"),
false,
true, ++mapId, pluginName, cameraCaps, metadata);
82 tr(
"Navigation Guidance Day"),
false,
false, ++mapId, pluginName, cameraCaps, metadata);
84 tr(
"Navigation Guidance Night"),
false,
true, ++mapId, pluginName, cameraCaps, metadata);
91 for (
auto it = idList.crbegin(),
end = idList.crend();
it !=
end; ++
it) {
95 metadata[
"isHTTPS"] =
false;
97 metadata[
"isHTTPS"] =
true;
100 tr(
"User provided style"),
false,
false, ++mapId, pluginName, cameraCaps, metadata));
110 bool memoryCache =
false;
123 if (!memoryCache &&
QDir::root().mkpath(cacheDirectory)) {
124 m_settings.setCacheDatabasePath(cacheDirectory +
"/mapboxgl.db");
132 m_settings.setCacheDatabaseMaximumSize(
cacheSize);
153 map->setMapboxGLSettings(m_settings, m_useChinaEndpoint);
154 map->setUseFBO(m_useFBO);
155 map->setMapItemsBefore(m_mapItemsBefore);
static QString baseLocationCacheDirectory()
static QDir root()
Returns the root directory.
void setSupportsBearing(bool supportsBearing)
Sets whether the associated plugin can render a map when the camera has an arbitrary bearing to suppo...
void setMaximumZoomLevel(double maximumZoomLevel)
void setMaximumTilt(double maximumTilt)
void setMaximumFieldOfView(double maximumFieldOfView)
void setMinimumFieldOfView(double minimumFieldOfView)
void setTileSize(int tileSize)
void setMinimumTilt(double minimumTilt)
void setMinimumZoomLevel(double minimumZoomLevel)
void setSupportsTilting(bool supportsTilting)
Sets whether the associated plugin can render a map when the camera is tilted to supportsTilting.
QGeoMappingManagerEngineMapboxGL(const QVariantMap ¶meters, QGeoServiceProvider::Error *error, QString *errorString)
QGeoMap * createMap() override
~QGeoMappingManagerEngineMapboxGL()
void setCameraCapabilities(const QGeoCameraCapabilities &capabilities)
void engineInitialized()
Marks the engine as initialized.
void setSupportedMapTypes(const QList< QGeoMapType > &supportedMapTypes)
Sets the list of map types supported by this engine to mapTypes.
QVariantMap parameters() const
Error
Describes an error related to the loading and setup of a service provider plugin.
void prepend(rvalue_ref t)
T value(const Key &key, const T &defaultValue=T()) const
bool contains(const Key &key) const
\macro QT_RESTRICTED_CAST_FROM_ASCII
int toInt(bool *ok=nullptr, int base=10) const
Returns the string converted to an int using base base, which is 10 by default and must be between 2 ...
void clear()
Clears the contents of the string and makes it null.
QString toString() const
Returns the variant as a QString if the variant has a userType() including, but not limited to:
bool toBool() const
Returns the variant as a bool if the variant has userType() Bool.
QMap< QString, QString > map
[6]
QSet< QString >::iterator it
Combined button and popup list for selecting options.
DBusConnection const char DBusError * error
GLenum GLenum GLsizei const GLuint * ids
static quint64 cacheSize()
#define QStringLiteral(str)
char * toString(const MyType &t)
[31]