mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-31 16:52:10 +01:00
attempt to get Pergo Turkish maps working. Still buggy. Unable to search and auto zoom. Initial map render works mostly
This commit is contained in:
parent
2c3f3f6a49
commit
361bb26212
@ -73,6 +73,8 @@ QString UrlFactory::TileXYToQuadKey(const int &tileX, const int &tileY, const in
|
||||
}
|
||||
int UrlFactory::GetServerNum(const Point &pos, const int &max) const
|
||||
{
|
||||
qDebug() << QString("%1").arg(pos.X());
|
||||
qDebug() << QString("%1").arg(pos.Y());
|
||||
return (pos.X() + 2 * pos.Y()) % max;
|
||||
}
|
||||
void UrlFactory::setIsCorrectGoogleVersions(bool value)
|
||||
@ -475,9 +477,11 @@ QString UrlFactory::MakeImageUrl(const MapType::Types &type, const Point &pos, c
|
||||
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?
|
||||
qDebug() << QString("http://map%1.pergo.com.tr/tile/%2/%3/%4.png").arg(GetServerNum(pos, 4)).arg(zoom, 2, 10, (QChar)'0').arg(x).arg(y);
|
||||
return QString("http://map%1.pergo.com.tr/tile/%2/%3/%4.png").arg(GetServerNum(pos, 4)).arg(zoom, 2, 10, (QChar)'0').arg(x).arg(y);
|
||||
// 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:
|
||||
|
@ -295,7 +295,7 @@ void Core::SetMapType(const MapType::Types &value)
|
||||
{
|
||||
if (Projection()->Type() != "PlateCarreeProjectionPergo") {
|
||||
SetProjection(new PlateCarreeProjectionPergo());
|
||||
maxzoom = 17;
|
||||
maxzoom = 18;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user