forked from organicmaps/organicmaps
[iOS] add toast for isolines on low zoom levels
https://jira.mail.ru/browse/MAPSME-13648 https://jira.mail.ru/browse/MAPSME-13711
This commit is contained in:
parent
30e835a851
commit
ce27f7936e
4 changed files with 12 additions and 1 deletions
|
@ -58,6 +58,7 @@ NS_SWIFT_NAME(MapOverlayManager)
|
|||
+ (BOOL)isoLinesEnabled;
|
||||
+ (BOOL)guidesEnabled;
|
||||
+ (BOOL)guidesFirstLaunch;
|
||||
+ (BOOL)isolinesVisible;
|
||||
|
||||
+ (void)setTrafficEnabled:(BOOL)enable;
|
||||
+ (void)setTransitEnabled:(BOOL)enable;
|
||||
|
|
|
@ -154,6 +154,10 @@ static NSString *kGuidesWasShown = @"guidesWasShown";
|
|||
return ![ud boolForKey:kGuidesWasShown];
|
||||
}
|
||||
|
||||
+ (BOOL)isolinesVisible {
|
||||
return GetFramework().GetIsolinesManager().IsVisible();
|
||||
}
|
||||
|
||||
+ (void)setTrafficEnabled:(BOOL)enable {
|
||||
if (enable) {
|
||||
[self setGuidesEnabled:false];
|
||||
|
|
|
@ -134,8 +134,13 @@ NSArray<UIImage *> *imagesWithName(NSString *name) {
|
|||
[[MWMToast toastWithText:L(@"subway_data_unavailable")] show];
|
||||
} else if ([MWMMapOverlayManager isoLinesEnabled]) {
|
||||
btn.imageName = @"btn_isoMap_on";
|
||||
if ([MWMMapOverlayManager isolinesState] == MWMMapOverlayIsolinesStateNoData)
|
||||
if ([MWMMapOverlayManager isolinesState] == MWMMapOverlayIsolinesStateEnabled &&
|
||||
![MWMMapOverlayManager isolinesVisible]) {
|
||||
[[MWMToast toastWithText:L(@"isolines_toast_zooms_1_10")] show];
|
||||
[Statistics logEvent:kStatMapToastShow withParameters:@{kStatType : kStatIsolines}];
|
||||
} else if ([MWMMapOverlayManager isolinesState] == MWMMapOverlayIsolinesStateNoData) {
|
||||
[[MWMToast toastWithText:L(@"isolines_location_error_dialog")] show];
|
||||
}
|
||||
else if ([MWMMapOverlayManager isolinesState] == MWMMapOverlayIsolinesStateExpiredData)
|
||||
[MWMAlertViewController.activeAlertController presentInfoAlert:L(@"isolines_activation_error_dialog") text:@""];
|
||||
} else if ([MWMMapOverlayManager guidesEnabled]) {
|
||||
|
|
|
@ -273,6 +273,7 @@ static NSString * const kStatMapSponsoredButtonShow = @"Map_SponsoredButton_show
|
|||
static NSString * const kStatMapSponsoredButtonClick = @"Map_SponsoredButton_click";
|
||||
static NSString * const kStatMapDataSize = @"map_data_size";
|
||||
static NSString * const kStatMapSearch = @"Map search";
|
||||
static NSString * const kStatMapToastShow = @"Map_Toast_show";
|
||||
static NSString * const kStatMapViewStyle = @"Map view style";
|
||||
static NSString * const kStatMapViewStyleSettings = @"Map view style settings";
|
||||
static NSString * const kStatMapsme = @"maps.me";
|
||||
|
|
Loading…
Add table
Reference in a new issue