diff options
author | Fabian Bumberger <fbumberger@rim.com> | 2014-01-26 21:14:33 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-04 16:08:30 +0100 |
commit | d87c2503c4a01a69975dd86991849580efd5beca (patch) | |
tree | 0e76786c9070a5da10fe567573b3d6015668ca81 /src | |
parent | 93773ce48d3f884fbd71a6783d317bda1880bd37 (diff) | |
download | qtlocation-d87c2503c4a01a69975dd86991849580efd5beca.tar.gz |
Switch to MapQuest tileserver
The official OSM tile server should not be used in applications.
MapQuest is free and also allows to display a satellite map (which
unfortunately only goes to zoomLevel 10).
More info:
http://wiki.openstreetmap.org/wiki/Tile_usage_policy
Change-Id: Ia5e0d2c99ea4d8f3989f8460c778bf748c5b68b5
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/geoservices/osm/qgeomapreplyosm.cpp | 3 | ||||
-rw-r--r-- | src/plugins/geoservices/osm/qgeotiledmappingmanagerengineosm.cpp | 1 | ||||
-rw-r--r-- | src/plugins/geoservices/osm/qgeotilefetcherosm.cpp | 9 |
3 files changed, 12 insertions, 1 deletions
diff --git a/src/plugins/geoservices/osm/qgeomapreplyosm.cpp b/src/plugins/geoservices/osm/qgeomapreplyosm.cpp index 4d8b005f..e75943b1 100644 --- a/src/plugins/geoservices/osm/qgeomapreplyosm.cpp +++ b/src/plugins/geoservices/osm/qgeomapreplyosm.cpp @@ -93,6 +93,9 @@ void QGeoMapReplyOsm::networkReplyFinished() case 1: setMapImageFormat("png"); break; + case 2: + setMapImageFormat("png"); + break; default: qWarning("Unknown map id %d", tileSpec().mapId()); } diff --git a/src/plugins/geoservices/osm/qgeotiledmappingmanagerengineosm.cpp b/src/plugins/geoservices/osm/qgeotiledmappingmanagerengineosm.cpp index 8e77f249..a141c239 100644 --- a/src/plugins/geoservices/osm/qgeotiledmappingmanagerengineosm.cpp +++ b/src/plugins/geoservices/osm/qgeotiledmappingmanagerengineosm.cpp @@ -60,6 +60,7 @@ QGeoTiledMappingManagerEngineOsm::QGeoTiledMappingManagerEngineOsm(const QVarian QList<QGeoMapType> mapTypes; mapTypes << QGeoMapType(QGeoMapType::StreetMap, tr("Street Map"), tr("Open street map street map"), false, 1); + mapTypes << QGeoMapType(QGeoMapType::SatelliteMapDay, tr("Satellite Map"), tr("Open street map satellite map"), false, 2); setSupportedMapTypes(mapTypes); QGeoTileFetcherOsm *tileFetcher = new QGeoTileFetcherOsm(this); diff --git a/src/plugins/geoservices/osm/qgeotilefetcherosm.cpp b/src/plugins/geoservices/osm/qgeotilefetcherosm.cpp index d2f71b3e..75c1492b 100644 --- a/src/plugins/geoservices/osm/qgeotilefetcherosm.cpp +++ b/src/plugins/geoservices/osm/qgeotilefetcherosm.cpp @@ -67,7 +67,14 @@ QGeoTiledMapReply *QGeoTileFetcherOsm::getTileImage(const QGeoTileSpec &spec) switch (spec.mapId()) { case 1: // opensteetmap.org street map - request.setUrl(QUrl(QStringLiteral("http://a.tile.openstreetmap.org/") + + request.setUrl(QUrl(QStringLiteral("http://otile1.mqcdn.com/tiles/1.0.0/map/") + + QString::number(spec.zoom()) + QLatin1Char('/') + + QString::number(spec.x()) + QLatin1Char('/') + + QString::number(spec.y()) + QStringLiteral(".png"))); + break; + case 2: + // opensteetmap.org satellite map + request.setUrl(QUrl(QStringLiteral("http://otile1.mqcdn.com/tiles/1.0.0/sat/") + QString::number(spec.zoom()) + QLatin1Char('/') + QString::number(spec.x()) + QLatin1Char('/') + QString::number(spec.y()) + QStringLiteral(".png"))); |