diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2018-05-03 21:48:58 +0200 |
---|---|---|
committer | Jordan Kiley <jmkiley@users.noreply.github.com> | 2018-05-03 12:48:58 -0700 |
commit | f6da3ba9be27ff9b279730603c517c4cb5e57007 (patch) | |
tree | 4c2474ac55af5a9eb1b2263b680176dfdd5943eb /platform/ios/app | |
parent | 844a8244097c18ae12e9c14baaaaad8a2f7ef436 (diff) | |
download | qtlocation-mapboxgl-f6da3ba9be27ff9b279730603c517c4cb5e57007.tar.gz |
iOS: Add custom layer example to debugging app (#7734)
Diffstat (limited to 'platform/ios/app')
-rw-r--r-- | platform/ios/app/MBXViewController.m | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/platform/ios/app/MBXViewController.m b/platform/ios/app/MBXViewController.m index 391af5ea05..c3585fbeae 100644 --- a/platform/ios/app/MBXViewController.m +++ b/platform/ios/app/MBXViewController.m @@ -5,6 +5,7 @@ #import "MBXOfflinePacksTableViewController.h" #import "MBXAnnotationView.h" #import "MBXUserLocationAnnotationView.h" +#import "LimeGreenStyleLayer.h" #import "MBXEmbeddedMapViewController.h" #import <Mapbox/Mapbox.h> @@ -82,6 +83,7 @@ typedef NS_ENUM(NSInteger, MBXSettingsRuntimeStylingRows) { MBXSettingsRuntimeStylingRasterTileSource, MBXSettingsRuntimeStylingImageSource, MBXSettingsRuntimeStylingRouteLine, + MBXSettingsRuntimeStylingAddLimeGreenTriangleLayer, MBXSettingsRuntimeStylingDDSPolygon, MBXSettingsRuntimeStylingCustomLatLonGrid, }; @@ -371,6 +373,7 @@ typedef NS_ENUM(NSInteger, MBXSettingsMiscellaneousRows) { @"Style Raster Tile Source", @"Style Image Source", @"Add Route Line", + @"Add Lime Green Triangle Layer", @"Dynamically Style Polygon", @"Add Custom Lat/Lon Grid", ]]; @@ -559,6 +562,9 @@ typedef NS_ENUM(NSInteger, MBXSettingsMiscellaneousRows) { case MBXSettingsRuntimeStylingRouteLine: [self styleRouteLine]; break; + case MBXSettingsRuntimeStylingAddLimeGreenTriangleLayer: + [self styleAddLimeGreenTriangleLayer]; + break; case MBXSettingsRuntimeStylingDDSPolygon: [self stylePolygonWithDDS]; break; @@ -1443,6 +1449,12 @@ typedef NS_ENUM(NSInteger, MBXSettingsMiscellaneousRows) { [self.mapView.style addLayer:routeLayer]; } +- (void)styleAddLimeGreenTriangleLayer +{ + LimeGreenStyleLayer *layer = [[LimeGreenStyleLayer alloc] initWithIdentifier:@"mbx-custom"]; + [self.mapView.style addLayer:layer]; +} + - (void)stylePolygonWithDDS { CLLocationCoordinate2D leftCoords[] = { {37.73081027834234, -122.49412536621094}, |