1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-01 09:24:10 +01:00

Depreciate Yandex maps

This commit is contained in:
Kevin Finisterre 2015-05-15 13:32:19 -04:00 committed by abeck70
parent 13b0eac79f
commit 17fa6341c3
8 changed files with 1 additions and 42 deletions

View File

@ -87,7 +87,6 @@ public:
GoogleLabelsKorea = 4003,
GoogleHybridKorea = 4005,
YandexMapRu = 5000
};
static QString StrByType(Types const & value)
{

View File

@ -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;
}

View File

@ -65,9 +65,6 @@ ProviderStrings::ProviderStrings()
// BingMaps
VersionBingMaps = "563";
// YandexMap
VersionYandexMap = "2.16.0";
// VersionYandexSatellite = "1.19.0";
////////////////////
/// <summary>

View File

@ -63,10 +63,6 @@ public:
// BingMaps
QString VersionBingMaps;
// YandexMap
QString VersionYandexMap;
/// <summary>
/// Bing Maps Customer Identification, more info here
/// http://msdn.microsoft.com/en-us/library/bb924353.aspx

View File

@ -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;

View File

@ -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") {

View File

@ -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"

View File

@ -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