Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[ios] Remove iosapp test stub
Browse files Browse the repository at this point in the history
The PR to add filter predicates (#6049) added logic to apply some
runtime styling to the iosapp as soon as the map finished loading.
This removes that logic.
  • Loading branch information
boundsj committed Sep 2, 2016
1 parent aff278c commit 52f2361
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions platform/ios/app/MBXViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -79,29 +79,6 @@ - (void)viewDidLoad
self.debugLoggingEnabled = [[NSUserDefaults standardUserDefaults] boolForKey:@"MGLMapboxMetricsDebugLoggingEnabled"];
}

- (void)mapViewDidFinishLoadingMap:(MGLMapView *)mapView

This comment has been minimized.

Copy link
@boundsj

boundsj Sep 2, 2016

Author Contributor
{
[mapView setCenterCoordinate:CLLocationCoordinate2DMake(52.36, 4.86) zoomLevel:12 animated:NO];

#warning DEBUG CODE

NSString *filePath = [[NSBundle bundleForClass:self.class] pathForResource:@"amsterdam" ofType:@"geojson"];
NSURL *url = [NSURL fileURLWithPath:filePath];
NSData *geoJSONData = [NSData dataWithContentsOfURL:url];
MGLGeoJSONSource *source = [[MGLGeoJSONSource alloc] initWithSourceIdentifier:@"source" geoJSONData:geoJSONData];
[self.mapView.style addSource:source];

MGLFillStyleLayer *parksLayer = [[MGLFillStyleLayer alloc] initWithLayerIdentifier:@"park-layer" sourceIdentifier:@"source"];
parksLayer.fillColor = [UIColor redColor];
parksLayer.predicate = [NSPredicate predicateWithFormat:@"name == 'Westerpark'"];
[self.mapView.style addLayer:parksLayer];

MGLFillStyleLayer *singleParkLayer = [[MGLFillStyleLayer alloc] initWithLayerIdentifier:@"single-park-layer" sourceIdentifier:@"source"];
singleParkLayer.fillColor = [UIColor greenColor];
singleParkLayer.predicate = [NSPredicate predicateWithFormat:@"name == 'vondelpark'"];
[self.mapView.style addLayer:singleParkLayer];
}

- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
Expand Down

0 comments on commit 52f2361

Please sign in to comment.