1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-03-15 07:29:15 +01:00

Depreciate Pergo maps

This commit is contained in:
Kevin Finisterre 2015-05-15 13:27:27 -04:00 committed by abeck70
parent 361bb26212
commit 13b0eac79f
6 changed files with 4 additions and 48 deletions

View File

@ -80,7 +80,6 @@ public:
ArcGIS_MapsLT_Map_Labels = 1002,
ArcGIS_MapsLT_Map_Hybrid = 1003,
PergoTurkeyMap = 2001,
SigPacSpainMap = 3001,
GoogleMapKorea = 4001,

View File

@ -121,7 +121,6 @@ QByteArray OPMaps::GetImageFrom(const MapType::Types &type, const Point &pos, co
#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
// "http://map3.pergo.com.tr/tile/02/000/000/007/000/000/002.png"
qheader.setUrl(QUrl(url));
qheader.setRawHeader("User-Agent", UserAgent);
qheader.setRawHeader("Accept", "*/*");

View File

@ -460,30 +460,6 @@ QString UrlFactory::MakeImageUrl(const MapType::Types &type, const Point &pos, c
//http://dc5.maps.lt/cache/mapslt_ortofoto_overlay/map/_alllayers/L01/R00000013/C0000001d.png
}
break;
case MapType::PergoTurkeyMap:
{
// http://{domain}/{layerName}/{zoomLevel}/{first3LetterOfTileX}/{second3LetterOfTileX}/{third3LetterOfTileX}/{first3LetterOfTileY}/{second3LetterOfTileY}/{third3LetterOfTileXY}.png
// http://map3.pergo.com.tr/tile/00/000/000/001/000/000/000.png
// That means: Zoom Level: 0 TileX: 1 TileY: 0
// http://domain/tile/14/000/019/371/000/011/825.png
// That means: Zoom Level: 14 TileX: 19371 TileY:11825
// string x = pos.X().ToString("000000000").Insert(3, "/").Insert(7, "/"); // - 000/000/001
// string y = pos.Y().ToString("000000000").Insert(3, "/").Insert(7, "/"); // - 000/000/000
QString x = QString("%1").arg(QString::number(pos.X()), 9, (QChar)'0');
x.insert(3, "/").insert(7, "/");
QString y = QString("%1").arg(QString::number(pos.Y()), 9, (QChar)'0');
y.insert(3, "/").insert(7, "/");
// "http://map03.pergo.com.tr/tile/2/000/000/003/000/000/002.png"
// This has changed map03 does not exist. (neither does map3) Servers have changed to map1 and map2 or maps?
qDebug() << QString("http://maps.pergo.com.tr/tile/%1/%2/%3.png").arg(zoom, 2, 10, (QChar)'0').arg(x).arg(y);
return QString("http://maps.pergo.com.tr/tile/%1/%2/%3.png").arg(zoom, 2, 10, (QChar)'0').arg(x).arg(y);
}
break;
case MapType::SigPacSpainMap:
{
// http://sigpac.magrama.es/fega/h5visor/ is new server location

View File

@ -111,19 +111,13 @@ void Core::run()
do {
QByteArray img;
// tile number inversion(BottomLeft -> TopLeft) for pergo maps
if (tl == MapType::PergoTurkeyMap) {
qDebug() << "inverting tiles for Pergo";
img = OPMaps::Instance()->GetImageFrom(tl, Point(task.Pos.X(), maxOfTiles.Height() - task.Pos.Y()), task.Zoom);
} else { // ok
#ifdef DEBUG_CORE
qDebug() << "start getting image" << " ID=" << debug;
qDebug() << "start getting image" << " ID=" << debug;
#endif // DEBUG_CORE
img = OPMaps::Instance()->GetImageFrom(tl, task.Pos, task.Zoom);
img = OPMaps::Instance()->GetImageFrom(tl, task.Pos, task.Zoom);
#ifdef DEBUG_CORE
qDebug() << "Core::run:gotimage size:" << img.count() << " ID=" << debug << " time=" << t.elapsed();
qDebug() << "Core::run:gotimage size:" << img.count() << " ID=" << debug << " time=" << t.elapsed();
#endif // DEBUG_CORE
}
if (img.length() != 0) {
Moverlays.lock();
@ -291,15 +285,6 @@ void Core::SetMapType(const MapType::Types &value)
}
break;
case MapType::PergoTurkeyMap:
{
if (Projection()->Type() != "PlateCarreeProjectionPergo") {
SetProjection(new PlateCarreeProjectionPergo());
maxzoom = 18;
}
}
break;
case MapType::YandexMapRu:
{
if (Projection()->Type() != "MercatorProjectionYandex") {

View File

@ -46,7 +46,6 @@
#include "../internals/projections/mercatorprojection.h"
#include "../internals/projections/mercatorprojectionyandex.h"
#include "../internals/projections/platecarreeprojection.h"
#include "../internals/projections/platecarreeprojectionpergo.h"
#include "../core/geodecoderstatus.h"
#include "../core/opmaps.h"
#include "../core/diagnostics.h"

View File

@ -25,11 +25,9 @@ HEADERS += ./projections/lks94projection.h \
./projections/mercatorprojection.h \
./projections/mercatorprojectionyandex.h \
./projections/platecarreeprojection.h \
./projections/platecarreeprojectionpergo.h
SOURCES += ./projections/lks94projection.cpp \
./projections/mercatorprojection.cpp \
./projections/mercatorprojectionyandex.cpp \
./projections/platecarreeprojection.cpp \
./projections/platecarreeprojectionpergo.cpp
./projections/platecarreeprojection.cpp
LIBS += -L../build \
-lcore