[ios] Draw empty space for features when no flag or compass are available

This commit is contained in:
Alex Zolotarev 2012-02-29 15:24:36 +01:00 committed by Alex Zolotarev
parent 858fb68c5d
commit 4f9b41de25
2 changed files with 6 additions and 4 deletions

View file

@ -36,7 +36,7 @@
{
[image drawInRect:rect];
}
else
else if (angle > 0.)
{
// Draws an arrow looking to the right like this:
// =>
@ -62,6 +62,7 @@
[[UIColor colorWithRed:c green:c blue:c alpha:1.0] setFill];
[aPath fill];
}
// Do not draw anything if angle is <0 or image wasn't set
}
@end

View file

@ -406,8 +406,8 @@ static void OnSearchResultCallback(search::Results const & res, int queryId)
// Separate case for continents
if (!r.GetRegionFlag())
{
// @TODO add valid icon
compass.image = [UIImage imageNamed:@"downloader"];
compass.angle = -1.0;
//compass.image = [UIImage imageNamed:@"downloader"];
}
else
{
@ -415,7 +415,8 @@ static void OnSearchResultCallback(search::Results const & res, int queryId)
CLHeading * heading = [m_locationManager lastHeading];
if (loc == nil || heading == nil)
{
compass.image = [UIImage imageNamed:@"location"];
compass.angle = -1.0;
//compass.image = [UIImage imageNamed:@"location"];
}
else
{