mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 16:56:53 +08:00
Ref T111, allow to search for location in coordinate form
This commit is contained in:
committed by
Mathew Sutcliffe
parent
bb4f0e7a13
commit
ccdfa8e12f
@@ -157,16 +157,25 @@ namespace BlackGui
|
||||
// location based on swift data
|
||||
if (sApp && sApp->hasWebDataServices())
|
||||
{
|
||||
CAirport airport;
|
||||
|
||||
// airport ICAO
|
||||
if (l.length() == 4 && sApp->getWebDataServices()->getAirportsCount() > 0)
|
||||
{
|
||||
const CAirport airport = sApp->getWebDataServices()->getAirportForIcaoDesignator(l);
|
||||
airport = sApp->getWebDataServices()->getAirportForIcaoDesignator(l);
|
||||
if (airport.hasValidDbKey())
|
||||
{
|
||||
this->setCoordinate(airport);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
airport = sApp->getWebDataServices()->getAirportForNameOrLocation(l);
|
||||
if (airport.hasValidDbKey())
|
||||
{
|
||||
this->setCoordinate(airport);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user