mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-19 04:52:12 +01:00
Remove depreciated Yahoo maps (now uses "Here" - https://developer.here.com/rest-apis which requires an API key we don't have) No desire to implement new Here interface.
Fix Yandex.ru interface to reference Yandex.net
This commit is contained in:
parent
390a8cccb5
commit
9fe4fb7216
@ -55,13 +55,6 @@ QVector<MapType::Types> AllLayersOfType::GetAllLayersOfType(const MapType::Types
|
||||
}
|
||||
break;
|
||||
|
||||
case MapType::YahooHybrid:
|
||||
{
|
||||
types.append(MapType::YahooSatellite);
|
||||
types.append(MapType::YahooLabels);
|
||||
}
|
||||
break;
|
||||
|
||||
case MapType::ArcGIS_MapsLT_Map_Hybrid:
|
||||
{
|
||||
types.append(MapType::ArcGIS_MapsLT_OrtoFoto);
|
||||
|
@ -52,11 +52,6 @@ public:
|
||||
OpenStreetMapSurfer = 34,
|
||||
OpenStreetMapSurferTerrain = 35,
|
||||
|
||||
YahooMap = 64,
|
||||
YahooSatellite = 128,
|
||||
YahooLabels = 256,
|
||||
YahooHybrid = 333,
|
||||
|
||||
BingMap = 444,
|
||||
BingSatellite = 555,
|
||||
BingHybrid = 666,
|
||||
|
@ -153,15 +153,6 @@ QByteArray OPMaps::GetImageFrom(const MapType::Types &type, const Point &pos, co
|
||||
}
|
||||
break;
|
||||
|
||||
case MapType::YahooHybrid:
|
||||
case MapType::YahooLabels:
|
||||
case MapType::YahooMap:
|
||||
case MapType::YahooSatellite:
|
||||
{
|
||||
qheader.setRawHeader("Referrer", "http://maps.yahoo.com/");
|
||||
}
|
||||
break;
|
||||
|
||||
case MapType::ArcGIS_MapsLT_Map_Labels:
|
||||
case MapType::ArcGIS_MapsLT_Map:
|
||||
case MapType::ArcGIS_MapsLT_OrtoFoto:
|
||||
|
@ -61,11 +61,6 @@ ProviderStrings::ProviderStrings()
|
||||
/// </summary>
|
||||
GoogleMapsAPIKey = "ABQIAAAAWaQgWiEBF3lW97ifKnAczhRAzBk5Igf8Z5n2W3hNnMT0j2TikxTLtVIGU7hCLLHMAuAMt-BO5UrEWA";
|
||||
|
||||
// Yahoo version strings
|
||||
VersionYahooMap = "4.3";
|
||||
VersionYahooSatellite = "1.9";
|
||||
VersionYahooLabels = "4.3";
|
||||
|
||||
// BingMaps
|
||||
VersionBingMaps = "563";
|
||||
|
||||
|
@ -60,11 +60,6 @@ public:
|
||||
/// </summary>
|
||||
|
||||
|
||||
// Yahoo version strings
|
||||
QString VersionYahooMap;
|
||||
QString VersionYahooSatellite;
|
||||
QString VersionYahooLabels;
|
||||
|
||||
// BingMaps
|
||||
QString VersionBingMaps;
|
||||
|
||||
|
@ -335,21 +335,7 @@ QString UrlFactory::MakeImageUrl(const MapType::Types &type, const Point &pos, c
|
||||
return QString("https://%1%2.gmaptiles.co.kr/%3/v=%4&hl=%5&x=%6%7&y=%8&z=%9&s=%10").arg(server).arg(GetServerNum(pos, 4)).arg(request).arg(VersionGoogleLabelsKorea).arg(language).arg(pos.X()).arg(sec1).arg(pos.Y()).arg(zoom).arg(sec2);
|
||||
}
|
||||
break;
|
||||
case MapType::YahooMap:
|
||||
{
|
||||
return QString("http://maps%1.yimg.com/hx/tl?v=%2&.intl=%3&x=%4&y=%5&z=%6&r=1").arg(((GetServerNum(pos, 2)) + 1)).arg(VersionYahooMap).arg(language).arg(pos.X()).arg((((1 << zoom) >> 1) - 1 - pos.Y())).arg((zoom + 1));
|
||||
}
|
||||
|
||||
case MapType::YahooSatellite:
|
||||
{
|
||||
return QString("http://maps%1.yimg.com/ae/ximg?v=%2&t=a&s=256&.intl=%3&x=%4&y=%5&z=%6&r=1").arg("3").arg(VersionYahooSatellite).arg(language).arg(pos.X()).arg(((1 << zoom) >> 1) - 1 - pos.Y()).arg(zoom + 1);
|
||||
}
|
||||
break;
|
||||
case MapType::YahooLabels:
|
||||
{
|
||||
return QString("http://maps%1.yimg.com/hx/tl?v=%2&t=h&.intl=%3&x=%4&y=%5&z=%6&r=1").arg("1").arg(VersionYahooLabels).arg(language).arg(pos.X()).arg(((1 << zoom) >> 1) - 1 - pos.Y()).arg(zoom + 1);
|
||||
}
|
||||
break;
|
||||
// *.yimg.com has been depreciated. "Here" is what Yahoo uses now. https://developer.here.com/rest-apis/documentation/enterprise-map-tile/topics/request-constructing.html
|
||||
case MapType::OpenStreetMap:
|
||||
{
|
||||
char letter = "abc"[GetServerNum(pos, 3)];
|
||||
@ -483,11 +469,19 @@ QString UrlFactory::MakeImageUrl(const MapType::Types &type, const Point &pos, c
|
||||
|
||||
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);
|
||||
|
||||
// http://vec01.maps.yandex.ru/tiles?l=map&v=2.10.2&x=1494&y=650&z=11
|
||||
|
||||
return QString("http://%1").arg(server) + QString("0%2.maps.yandex.ru/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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user