diff options
author | Jason Wray <jason@mapbox.com> | 2018-12-07 14:43:45 -0500 |
---|---|---|
committer | Jason Wray <jason@mapbox.com> | 2018-12-07 14:43:45 -0500 |
commit | bb0dd5bd962f193787c724da82a286f237806896 (patch) | |
tree | 4da7e9814652faf1fe8b03e6e789682bf9439e76 | |
parent | 1b0365429de2175688f496db3b0ac5cdb1439fb6 (diff) | |
download | qtlocation-mapboxgl-upstream/friedbunny-updates-a11y-for-streets-v8.tar.gz |
[ios, macos] Add Streets-v8 field names to accessibility checksupstream/friedbunny-updates-a11y-for-streets-v8
-rw-r--r-- | platform/darwin/src/MGLStyle.mm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/platform/darwin/src/MGLStyle.mm b/platform/darwin/src/MGLStyle.mm index f61fd9952b..b9acb4a235 100644 --- a/platform/darwin/src/MGLStyle.mm +++ b/platform/darwin/src/MGLStyle.mm @@ -600,7 +600,7 @@ static_assert(6 == mbgl::util::default_styles::numOrderedStyles, - (NSArray<MGLStyleLayer *> *)placeStyleLayers { NSSet *streetsSourceIdentifiers = [self.mapboxStreetsSources valueForKey:@"identifier"]; - NSSet *placeSourceLayerIdentifiers = [NSSet setWithObjects:@"marine_label", @"country_label", @"state_label", @"place_label", @"water_label", @"poi_label", @"rail_station_label", @"mountain_peak_label", nil]; + NSSet *placeSourceLayerIdentifiers = [NSSet setWithObjects:@"marine_label", @"country_label", @"state_label", @"place_label", @"water_label", @"poi_label", @"rail_station_label", @"mountain_peak_label", @"natural_label", @"transit_stop_label", nil]; NSPredicate *isPlacePredicate = [NSPredicate predicateWithBlock:^BOOL (MGLVectorStyleLayer * _Nullable layer, NSDictionary<NSString *, id> * _Nullable bindings) { return [layer isKindOfClass:[MGLVectorStyleLayer class]] && [streetsSourceIdentifiers containsObject:layer.sourceIdentifier] && [placeSourceLayerIdentifiers containsObject:layer.sourceLayerIdentifier]; }]; @@ -609,9 +609,10 @@ static_assert(6 == mbgl::util::default_styles::numOrderedStyles, - (NSArray<MGLStyleLayer *> *)roadStyleLayers { NSSet *streetsSourceIdentifiers = [self.mapboxStreetsSources valueForKey:@"identifier"]; - + + NSSet *roadStyleLayerIdentifiers = [NSSet setWithObjects:@"road_label", @"road", nil]; NSPredicate *isPlacePredicate = [NSPredicate predicateWithBlock:^BOOL (MGLVectorStyleLayer * _Nullable layer, NSDictionary<NSString *, id> * _Nullable bindings) { - return [layer isKindOfClass:[MGLVectorStyleLayer class]] && [streetsSourceIdentifiers containsObject:layer.sourceIdentifier] && [layer.sourceLayerIdentifier isEqualToString:@"road_label"]; + return [layer isKindOfClass:[MGLVectorStyleLayer class]] && [streetsSourceIdentifiers containsObject:layer.sourceIdentifier] && [roadStyleLayerIdentifiers containsObject:layer.sourceLayerIdentifier]; }]; return [self.layers filteredArrayUsingPredicate:isPlacePredicate]; } |