summaryrefslogtreecommitdiff
path: root/src/plugins/geoservices/esri
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/geoservices/esri')
-rw-r--r--src/plugins/geoservices/esri/geomapsource.cpp4
-rw-r--r--src/plugins/geoservices/esri/geomapsource.h3
-rw-r--r--src/plugins/geoservices/esri/geotiledmappingmanagerengine_esri.cpp15
-rw-r--r--src/plugins/geoservices/esri/geotiledmappingmanagerengine_esri.h2
4 files changed, 13 insertions, 11 deletions
diff --git a/src/plugins/geoservices/esri/geomapsource.cpp b/src/plugins/geoservices/esri/geomapsource.cpp
index 19f284e6..7ec63e2f 100644
--- a/src/plugins/geoservices/esri/geomapsource.cpp
+++ b/src/plugins/geoservices/esri/geomapsource.cpp
@@ -67,8 +67,8 @@ static const MapStyleData mapStyles[] =
GeoMapSource::GeoMapSource(QGeoMapType::MapStyle style, const QString &name,
const QString &description, bool mobile, bool night, int mapId,
- const QString &url, const QString &copyright) :
- QGeoMapType(style, name, description, mobile, night, mapId, "esri"),
+ const QString &url, const QString &copyright, const QGeoCameraCapabilities &cameraCapabilities) :
+ QGeoMapType(style, name, description, mobile, night, mapId, "esri", cameraCapabilities),
m_url(url), m_copyright(copyright)
{
}
diff --git a/src/plugins/geoservices/esri/geomapsource.h b/src/plugins/geoservices/esri/geomapsource.h
index 8660e999..86258d2e 100644
--- a/src/plugins/geoservices/esri/geomapsource.h
+++ b/src/plugins/geoservices/esri/geomapsource.h
@@ -41,6 +41,7 @@
#define GEOMAPSOURCE_H
#include <QtLocation/private/qgeomaptype_p.h>
+#include <QtLocation/private/qgeocameracapabilities_p.h>
QT_BEGIN_NAMESPACE
@@ -49,7 +50,7 @@ class GeoMapSource : public QGeoMapType
public:
GeoMapSource(QGeoMapType::MapStyle style, const QString &name,
const QString &description, bool mobile, bool night, int mapId,
- const QString &url, const QString &copyright);
+ const QString &url, const QString &copyright, const QGeoCameraCapabilities &cameraCapabilities);
inline const QString &url() const;
inline const QString &copyright() const;
diff --git a/src/plugins/geoservices/esri/geotiledmappingmanagerengine_esri.cpp b/src/plugins/geoservices/esri/geotiledmappingmanagerengine_esri.cpp
index 23783d7e..ac8f8450 100644
--- a/src/plugins/geoservices/esri/geotiledmappingmanagerengine_esri.cpp
+++ b/src/plugins/geoservices/esri/geotiledmappingmanagerengine_esri.cpp
@@ -106,7 +106,7 @@ GeoTiledMappingManagerEngineEsri::GeoTiledMappingManagerEngineEsri(const QVarian
setTileSize(QSize(256, 256));
- if (!initializeMapSources(error, errorString))
+ if (!initializeMapSources(error, errorString, cameraCaps))
return;
QList<QGeoMapType> mapTypes;
@@ -119,7 +119,8 @@ GeoTiledMappingManagerEngineEsri::GeoTiledMappingManagerEngineEsri(const QVarian
mapSource->mobile(),
mapSource->night(),
mapSource->mapId(),
- "esri");
+ "esri",
+ cameraCaps);
}
setSupportedMapTypes(mapTypes);
@@ -237,7 +238,8 @@ QGeoMap *GeoTiledMappingManagerEngineEsri::createMap()
// template = 'http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/{{z}}/{{y}}/{{x}}.png'
bool GeoTiledMappingManagerEngineEsri::initializeMapSources(QGeoServiceProvider::Error *error,
- QString *errorString)
+ QString *errorString,
+ const QGeoCameraCapabilities &cameraCaps)
{
initResources();
QFile mapsFile(":/esri/maps.json");
@@ -271,9 +273,7 @@ bool GeoTiledMappingManagerEngineEsri::initializeMapSources(QGeoServiceProvider:
foreach (QVariant mapSourceElement, mapSources) {
QVariantMap mapSource = mapSourceElement.toMap();
- int mapId = mapSource[kPropMapId].toInt();
- if (mapId <= 0)
- mapId = m_mapSources.count() + 1;
+ int mapId = m_mapSources.count() + 1;
m_mapSources << new GeoMapSource(
GeoMapSource::mapStyle(mapSource[kPropStyle].toString()),
@@ -283,7 +283,8 @@ bool GeoTiledMappingManagerEngineEsri::initializeMapSources(QGeoServiceProvider:
mapSource[kPropMapId].toBool(),
mapId,
GeoMapSource::toFormat(mapSource[kPropUrl].toString()),
- mapSource[kPropCopyright].toString()
+ mapSource[kPropCopyright].toString(),
+ cameraCaps
);
}
diff --git a/src/plugins/geoservices/esri/geotiledmappingmanagerengine_esri.h b/src/plugins/geoservices/esri/geotiledmappingmanagerengine_esri.h
index a13ba05c..ea0c3c8b 100644
--- a/src/plugins/geoservices/esri/geotiledmappingmanagerengine_esri.h
+++ b/src/plugins/geoservices/esri/geotiledmappingmanagerengine_esri.h
@@ -63,7 +63,7 @@ public:
GeoMapSource *mapSource(int mapId) const;
private:
- bool initializeMapSources(QGeoServiceProvider::Error *error, QString *errorString);
+ bool initializeMapSources(QGeoServiceProvider::Error *error, QString *errorString, const QGeoCameraCapabilities &cameraCaps);
QList<GeoMapSource *> m_mapSources;
};