Skip to content

Commit

Permalink
Fix missing maps
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanPyrohivskyi committed Jan 9, 2025
1 parent 55d6d2f commit 7263c73
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions Sources/Helpers/MissingMapsCalculator/MissingMapsCalculator.mm
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,13 @@ - (BOOL)checkIfThereAreMissingMaps:(std::shared_ptr<RoutingContext>)ctx
{
if (p.hhEditions == nil)
{
if ([p.regions count] > 0)
for (NSString * r in p.regions)
{
[mapsToDownload addObject:[p.regions objectAtIndex:0]];
if (![self isRoadOnlyMap:r])
{
[mapsToDownload addObject:r];
break;
}
}
}
else if (checkHHEditions)
Expand Down Expand Up @@ -415,4 +419,16 @@ - (NSString *)getErrorMessage
return msg;
}

- (BOOL) isRoadOnlyMap:(NSString *)regionName
{
if (_or != nil)
{
OAWorldRegion * wr = [_or getRegionDataByDownloadName:regionName];
if (wr != nil)
{
return ![wr regionMap] && [wr regionRoads];
}
}
}

@end

0 comments on commit 7263c73

Please sign in to comment.