From 17fa6341c313d22b868556ce3130f6e76be90d49 Mon Sep 17 00:00:00 2001 From: Kevin Finisterre Date: Fri, 15 May 2015 13:32:19 -0400 Subject: [PATCH] Depreciate Yandex maps --- .../src/libs/opmapcontrol/src/core/maptype.h | 1 - .../src/libs/opmapcontrol/src/core/opmaps.cpp | 7 +------ .../opmapcontrol/src/core/providerstrings.cpp | 3 --- .../libs/opmapcontrol/src/core/providerstrings.h | 4 ---- .../libs/opmapcontrol/src/core/urlfactory.cpp | 16 ---------------- .../src/libs/opmapcontrol/src/internals/core.cpp | 9 --------- .../src/libs/opmapcontrol/src/internals/core.h | 1 - .../opmapcontrol/src/internals/internals.pro | 2 -- 8 files changed, 1 insertion(+), 42 deletions(-) diff --git a/ground/openpilotgcs/src/libs/opmapcontrol/src/core/maptype.h b/ground/openpilotgcs/src/libs/opmapcontrol/src/core/maptype.h index 1218e5547..7839f2629 100644 --- a/ground/openpilotgcs/src/libs/opmapcontrol/src/core/maptype.h +++ b/ground/openpilotgcs/src/libs/opmapcontrol/src/core/maptype.h @@ -87,7 +87,6 @@ public: GoogleLabelsKorea = 4003, GoogleHybridKorea = 4005, - YandexMapRu = 5000 }; static QString StrByType(Types const & value) { diff --git a/ground/openpilotgcs/src/libs/opmapcontrol/src/core/opmaps.cpp b/ground/openpilotgcs/src/libs/opmapcontrol/src/core/opmaps.cpp index 2dc3c0525..2a6955f1d 100644 --- a/ground/openpilotgcs/src/libs/opmapcontrol/src/core/opmaps.cpp +++ b/ground/openpilotgcs/src/libs/opmapcontrol/src/core/opmaps.cpp @@ -120,7 +120,7 @@ QByteArray OPMaps::GetImageFrom(const MapType::Types &type, const Point &pos, co QString url = MakeImageUrl(type, pos, zoom, LanguageStr); #ifdef DEBUG_TIMINGS qDebug() << "opmaps after make image url" << time.elapsed(); -#endif // url "http://vec02.maps.yandex.ru/tiles?l=map&v=2.10.2&x=7&y=5&z=3" string +#endif // url can be hard coded for debugging purposes qheader.setUrl(QUrl(url)); qheader.setRawHeader("User-Agent", UserAgent); qheader.setRawHeader("Accept", "*/*"); @@ -184,11 +184,6 @@ QByteArray OPMaps::GetImageFrom(const MapType::Types &type, const Point &pos, co } break; - case MapType::YandexMapRu: - { - qheader.setRawHeader("Referrer", "http://maps.yandex.ru/"); - } - break; default: break; } diff --git a/ground/openpilotgcs/src/libs/opmapcontrol/src/core/providerstrings.cpp b/ground/openpilotgcs/src/libs/opmapcontrol/src/core/providerstrings.cpp index 5edaf488f..bde10b5ec 100644 --- a/ground/openpilotgcs/src/libs/opmapcontrol/src/core/providerstrings.cpp +++ b/ground/openpilotgcs/src/libs/opmapcontrol/src/core/providerstrings.cpp @@ -65,9 +65,6 @@ ProviderStrings::ProviderStrings() // BingMaps VersionBingMaps = "563"; - // YandexMap - VersionYandexMap = "2.16.0"; - // VersionYandexSatellite = "1.19.0"; //////////////////// /// diff --git a/ground/openpilotgcs/src/libs/opmapcontrol/src/core/providerstrings.h b/ground/openpilotgcs/src/libs/opmapcontrol/src/core/providerstrings.h index b0d2389d9..d406539e6 100644 --- a/ground/openpilotgcs/src/libs/opmapcontrol/src/core/providerstrings.h +++ b/ground/openpilotgcs/src/libs/opmapcontrol/src/core/providerstrings.h @@ -63,10 +63,6 @@ public: // BingMaps QString VersionBingMaps; - // YandexMap - QString VersionYandexMap; - - /// /// Bing Maps Customer Identification, more info here /// http://msdn.microsoft.com/en-us/library/bb924353.aspx diff --git a/ground/openpilotgcs/src/libs/opmapcontrol/src/core/urlfactory.cpp b/ground/openpilotgcs/src/libs/opmapcontrol/src/core/urlfactory.cpp index c6d2fa16f..8d9956b29 100644 --- a/ground/openpilotgcs/src/libs/opmapcontrol/src/core/urlfactory.cpp +++ b/ground/openpilotgcs/src/libs/opmapcontrol/src/core/urlfactory.cpp @@ -468,22 +468,6 @@ QString UrlFactory::MakeImageUrl(const MapType::Types &type, const Point &pos, c } break; - case MapType::YandexMapRu: - { - /* - Used "oldmaps" to determine map types - https://old.maps.yandex.ru/?ll=-83.110960%2C40.091250&spn=7.745361%2C6.015476&z=7&l=map - map: 'https:\/\/vec0%d.maps.yandex.net\/tiles?l=map&%c&%l', - sat: 'https:\/\/sat0%d.maps.yandex.net\/tiles?l=sat&%c&%l', - skl: 'https:\/\/vec0%d.maps.yandex.net\/tiles?l=skl&%c&%l', - */ - - QString server = "vec"; - return QString("http://%1").arg(server) + QString("0%2.maps.yandex.net/tiles?l=map&v=%3&x=%4&y=%5&z=%6").arg(GetServerNum(pos, 4) + 1).arg(VersionYandexMap).arg(pos.X()).arg(pos.Y()).arg(zoom); - -// Satllite maps are poor quality, but available. -// QString server = "sat"; -// return QString("http://%1").arg(server) + QString("0%2.maps.yandex.net/tiles?l=sat&v=%3&x=%4&y=%5&z=%6").arg(GetServerNum(pos, 4) + 1).arg(VersionYandexMap).arg(pos.X()).arg(pos.Y()).arg(zoom); - } break; default: break; diff --git a/ground/openpilotgcs/src/libs/opmapcontrol/src/internals/core.cpp b/ground/openpilotgcs/src/libs/opmapcontrol/src/internals/core.cpp index 708d0ea77..ba1fb1708 100644 --- a/ground/openpilotgcs/src/libs/opmapcontrol/src/internals/core.cpp +++ b/ground/openpilotgcs/src/libs/opmapcontrol/src/internals/core.cpp @@ -285,15 +285,6 @@ void Core::SetMapType(const MapType::Types &value) } break; - case MapType::YandexMapRu: - { - if (Projection()->Type() != "MercatorProjectionYandex") { - SetProjection(new MercatorProjectionYandex()); - maxzoom = 13; - } - } - break; - default: { if (Projection()->Type() != "MercatorProjection") { diff --git a/ground/openpilotgcs/src/libs/opmapcontrol/src/internals/core.h b/ground/openpilotgcs/src/libs/opmapcontrol/src/internals/core.h index 76937e07c..25b7e58b9 100644 --- a/ground/openpilotgcs/src/libs/opmapcontrol/src/internals/core.h +++ b/ground/openpilotgcs/src/libs/opmapcontrol/src/internals/core.h @@ -44,7 +44,6 @@ #include "rectlatlng.h" #include "../internals/projections/lks94projection.h" #include "../internals/projections/mercatorprojection.h" -#include "../internals/projections/mercatorprojectionyandex.h" #include "../internals/projections/platecarreeprojection.h" #include "../core/geodecoderstatus.h" #include "../core/opmaps.h" diff --git a/ground/openpilotgcs/src/libs/opmapcontrol/src/internals/internals.pro b/ground/openpilotgcs/src/libs/opmapcontrol/src/internals/internals.pro index 8c2ad53e9..c94fcca7e 100644 --- a/ground/openpilotgcs/src/libs/opmapcontrol/src/internals/internals.pro +++ b/ground/openpilotgcs/src/libs/opmapcontrol/src/internals/internals.pro @@ -23,11 +23,9 @@ SOURCES += core.cpp \ mousewheelzoomtype.cpp HEADERS += ./projections/lks94projection.h \ ./projections/mercatorprojection.h \ - ./projections/mercatorprojectionyandex.h \ ./projections/platecarreeprojection.h \ SOURCES += ./projections/lks94projection.cpp \ ./projections/mercatorprojection.cpp \ - ./projections/mercatorprojectionyandex.cpp \ ./projections/platecarreeprojection.cpp LIBS += -L../build \ -lcore