summaryrefslogtreecommitdiff
path: root/platform/ios/app
diff options
context:
space:
mode:
authorJason Wray <jason@mapbox.com>2018-11-19 19:19:07 -0500
committerJason Wray <jason@mapbox.com>2018-11-20 11:48:18 -0500
commitddcecdf7f7a190f5ddf5f48b45b52dedb186555c (patch)
tree8b51a6b1b39a659e4a148753afe32506d7629e00 /platform/ios/app
parent4519f8a867e50eccb3f85b683636de43924e7450 (diff)
downloadqtlocation-mapboxgl-ddcecdf7f7a190f5ddf5f48b45b52dedb186555c.tar.gz
[darwin] Rename variables to avoid shadow declarations
Per GCC_WARN_SHADOW.
Diffstat (limited to 'platform/ios/app')
-rw-r--r--platform/ios/app/MBXOfflinePacksTableViewController.m6
-rw-r--r--platform/ios/app/MBXViewController.m20
2 files changed, 13 insertions, 13 deletions
diff --git a/platform/ios/app/MBXOfflinePacksTableViewController.m b/platform/ios/app/MBXOfflinePacksTableViewController.m
index 959ae57548..497784f36b 100644
--- a/platform/ios/app/MBXOfflinePacksTableViewController.m
+++ b/platform/ios/app/MBXOfflinePacksTableViewController.m
@@ -110,9 +110,9 @@ static NSString * const MBXOfflinePacksTableViewActiveCellReuseIdentifier = @"Ac
[[MGLOfflineStorage sharedOfflineStorage] addPackForRegion:region withContext:context completionHandler:^(MGLOfflinePack *pack, NSError *error) {
if (error) {
NSString *message = [NSString stringWithFormat:@"Mapbox GL was unable to add the offline pack “%@”.", name];
- UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"Can’t Add Offline Pack" message:message preferredStyle:UIAlertControllerStyleAlert];
- [alertController addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:nil]];
- [self presentViewController:alertController animated:YES completion:nil];
+ UIAlertController *errorAlertController = [UIAlertController alertControllerWithTitle:@"Can’t Add Offline Pack" message:message preferredStyle:UIAlertControllerStyleAlert];
+ [errorAlertController addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:nil]];
+ [self presentViewController:errorAlertController animated:YES completion:nil];
} else {
[pack resume];
}
diff --git a/platform/ios/app/MBXViewController.m b/platform/ios/app/MBXViewController.m
index dff484b29f..3520051434 100644
--- a/platform/ios/app/MBXViewController.m
+++ b/platform/ios/app/MBXViewController.m
@@ -1159,10 +1159,10 @@ CLLocationCoordinate2D randomWorldCoordinate() {
}
dispatch_async(dispatch_get_main_queue(), ^{
- MGLShapeSource *source = [[MGLShapeSource alloc] initWithIdentifier:querySourceID features:visibleFeatures options:nil];
- [self.mapView.style addSource:source];
+ MGLShapeSource *shapeSource = [[MGLShapeSource alloc] initWithIdentifier:querySourceID features:visibleFeatures options:nil];
+ [self.mapView.style addSource:shapeSource];
- MGLFillStyleLayer *fillLayer = [[MGLFillStyleLayer alloc] initWithIdentifier:queryLayerID source:source];
+ MGLFillStyleLayer *fillLayer = [[MGLFillStyleLayer alloc] initWithIdentifier:queryLayerID source:shapeSource];
fillLayer.fillColor = [NSExpression expressionForConstantValue:[UIColor blueColor]];
fillLayer.fillOpacity = [NSExpression expressionForConstantValue:@0.5];
[self.mapView.style addLayer:fillLayer];
@@ -1264,10 +1264,10 @@ CLLocationCoordinate2D randomWorldCoordinate() {
[self.mapView.style addLayer:layer];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
- NSString *geoJSON = @"{\"type\": \"FeatureCollection\",\"features\": [{\"type\": \"Feature\",\"properties\": {},\"geometry\": {\"type\": \"LineString\",\"coordinates\": [[-107.75390625,40.329795743702064],[-109.34814453125,37.64903402157866]]}}]}";
- NSData *data = [geoJSON dataUsingEncoding:NSUTF8StringEncoding];
- MGLShape *shape = [MGLShape shapeWithData:data encoding:NSUTF8StringEncoding error:NULL];
- source.shape = shape;
+ NSString *updatedGeoJSON = @"{\"type\": \"FeatureCollection\",\"features\": [{\"type\": \"Feature\",\"properties\": {},\"geometry\": {\"type\": \"LineString\",\"coordinates\": [[-107.75390625,40.329795743702064],[-109.34814453125,37.64903402157866]]}}]}";
+ NSData *updatedData = [updatedGeoJSON dataUsingEncoding:NSUTF8StringEncoding];
+ MGLShape *updatedShape = [MGLShape shapeWithData:updatedData encoding:NSUTF8StringEncoding error:NULL];
+ source.shape = updatedShape;
});
}
@@ -1286,10 +1286,10 @@ CLLocationCoordinate2D randomWorldCoordinate() {
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[self.mapView setCenterCoordinate:CLLocationCoordinate2DMake(41.563986787078704, -75.04843935793578) zoomLevel:8 animated:NO];
- NSString *filePath = [[NSBundle bundleForClass:self.class] pathForResource:@"threestates" ofType:@"geojson"];
- NSURL *geoJSONURL = [NSURL fileURLWithPath:filePath];
+ NSString *threeStatesFilePath = [[NSBundle bundleForClass:self.class] pathForResource:@"threestates" ofType:@"geojson"];
+ NSURL *updatedGeoJSONURL = [NSURL fileURLWithPath:threeStatesFilePath];
- source.URL = geoJSONURL;
+ source.URL = updatedGeoJSONURL;
});
}