From c668d1ee2c9bdae18d8de945a71b2047d5c7c032 Mon Sep 17 00:00:00 2001 From: jmkiley Date: Wed, 30 Aug 2017 15:36:41 -0700 Subject: [PATCH 01/44] Added traffic layers --- Funhouse/MBXTrafficPlugin.h | 10 + Funhouse/MBXTrafficPlugin.m | 238 ++++++++++++++++++++++++ Funhouse/MGLStyleLayer+MBXAdditions.h | 13 ++ Funhouse/MGLStyleLayer+MBXAdditions.m | 14 ++ LICENSE.md | 14 ++ MapboxMapsPlugins.podspec | 75 ++++++++ MapboxPlugins.xcodeproj/project.pbxproj | 35 ++++ TestApp/Base.lproj/Main.storyboard | 12 +- TestApp/PluginTableViewController.m | 1 + TrafficPlugin/README.md | 1 + insert-mapbox-token.sh | 14 ++ 11 files changed, 421 insertions(+), 6 deletions(-) create mode 100644 Funhouse/MBXTrafficPlugin.h create mode 100644 Funhouse/MBXTrafficPlugin.m create mode 100644 Funhouse/MGLStyleLayer+MBXAdditions.h create mode 100644 Funhouse/MGLStyleLayer+MBXAdditions.m create mode 100644 LICENSE.md create mode 100644 MapboxMapsPlugins.podspec create mode 100644 TrafficPlugin/README.md create mode 100755 insert-mapbox-token.sh diff --git a/Funhouse/MBXTrafficPlugin.h b/Funhouse/MBXTrafficPlugin.h new file mode 100644 index 0000000..a2e08a1 --- /dev/null +++ b/Funhouse/MBXTrafficPlugin.h @@ -0,0 +1,10 @@ + +#import +#import +@import Mapbox; + +@interface MBXTrafficPlugin : NSObject + + + +@end diff --git a/Funhouse/MBXTrafficPlugin.m b/Funhouse/MBXTrafficPlugin.m new file mode 100644 index 0000000..054a5d3 --- /dev/null +++ b/Funhouse/MBXTrafficPlugin.m @@ -0,0 +1,238 @@ + +#import "MBXTrafficPlugin.h" +@interface MBXTrafficPlugin () + +@property (nonatomic, retain) MGLVectorSource *source; +@property (nonatomic, retain) MGLStyleValue *trafficColor; + +@end + +@implementation MBXTrafficPlugin + +// TODO: Break up into layers based on class. +// TODO: Add a method so users can select which layer this is inserted under. +- (void)addToMapView:(MGLMapView *)mapView { + + // Add traffic source to map style. + _source = [[MGLVectorSource alloc] initWithIdentifier:@"traffic-source" configurationURL:[NSURL URLWithString:@"mapbox://mapbox.mapbox-traffic-v1"]]; + [mapView.style addSource:_source]; + + // TODO: Set line width based on road type. + NSDictionary *stopsDictionary = @{ + @"low" : [MGLStyleValue valueWithRawValue:[UIColor colorWithRed:88.0/255.0 + green:195.0/255.0 + blue:35.0/255.0 + alpha:1]], + @"moderate" : [MGLStyleValue valueWithRawValue:[UIColor colorWithRed:88.0/255.0 + green:195.0/255.0 + blue:35.0/255.0 + alpha:1]], + @"heavy" : [MGLStyleValue valueWithRawValue:[UIColor colorWithRed:242.0/255.0 + green:185.0/255.0 + blue:15.0/255.0 + alpha:1]], + @"severe" : [MGLStyleValue valueWithRawValue:[UIColor colorWithRed:204.0/255.0 + green:0 + blue:0 + alpha:1]] + }; + _trafficColor = [MGLStyleValue valueWithInterpolationMode:MGLInterpolationModeCategorical sourceStops:stopsDictionary attributeName:@"congestion" options:@{MGLStyleFunctionOptionDefaultValue : [MGLStyleValue valueWithRawValue:[UIColor greenColor]]}]; + + // TODO: Allow user to set which layer it is inserted under. + MGLSymbolStyleLayer *symbolLayer = [mapView.style layerWithIdentifier:@"poi-scalerank3"]; + + // Consolidate to one layer once lineWidth supports DDS. + [self addMotorwayLinkLayerTo:mapView below:symbolLayer]; + [self addMotorwayLayerTo:mapView below:symbolLayer]; + [self addTrunkLayerTo:mapView below:symbolLayer]; + [self addPrimaryLayerTo:mapView below:symbolLayer]; + [self addSecondaryLayerTo:mapView below:symbolLayer]; + [self addTertiaryLayerTo:mapView below:symbolLayer]; + [self addLinkLayerTo:mapView below:symbolLayer]; + [self addStreetLayerTo:mapView below:symbolLayer]; + [self addServiceLayerTo:mapView below:symbolLayer]; + +} + +// MARK: Individual layers + +- (void)addMotorwayLayerTo:(MGLMapView *)mapView below:(MGLSymbolStyleLayer *)symbolLayer { + + MGLLineStyleLayer *motorwayLayer = [[MGLLineStyleLayer alloc] initWithIdentifier:@"motorway-layer" source:_source]; + motorwayLayer.sourceLayerIdentifier = @"traffic"; + motorwayLayer.predicate = [NSPredicate predicateWithFormat:@"class == 'motorway'"]; + + motorwayLayer.lineColor = _trafficColor; + + NSDictionary *motorwayLineWidthDictionary = @{ + @7 : [MGLStyleValue valueWithRawValue:@1], + @18 : [MGLStyleValue valueWithRawValue:@24] + }; + + motorwayLayer.lineWidth = [MGLStyleValue valueWithInterpolationMode: MGLInterpolationModeExponential + cameraStops:motorwayLineWidthDictionary + options:@{ + MGLStyleFunctionOptionDefaultValue : [MGLStyleValue valueWithRawValue:@3], + MGLStyleFunctionOptionInterpolationBase : @1.5}]; + [mapView.style insertLayer:motorwayLayer belowLayer:symbolLayer]; +} + +- (void)addMotorwayLinkLayerTo:(MGLMapView *)mapView below:(MGLSymbolStyleLayer *)symbolLayer { + NSDictionary *motorwayLinkLineWidthDictionary = @{ + @7 : [MGLStyleValue valueWithRawValue:@1], + @18 : [MGLStyleValue valueWithRawValue:@24] + }; + MGLLineStyleLayer *motorwayLinkLayer = [[MGLLineStyleLayer alloc] initWithIdentifier:@"motorway-link-layer" source:_source]; + motorwayLinkLayer.sourceLayerIdentifier = @"traffic"; + motorwayLinkLayer.predicate = [NSPredicate predicateWithFormat:@"class == 'motorway_link'"]; + motorwayLinkLayer.lineColor = _trafficColor; + motorwayLinkLayer.lineWidth = [MGLStyleValue valueWithInterpolationMode:MGLInterpolationModeExponential + cameraStops:motorwayLinkLineWidthDictionary + options: @{ + MGLStyleFunctionOptionDefaultValue : [MGLStyleValue valueWithRawValue:@3], + MGLStyleFunctionOptionInterpolationBase : @1.5}]; + [mapView.style insertLayer:motorwayLinkLayer belowLayer:symbolLayer]; + +} + +- (void)addTrunkLayerTo:(MGLMapView *)mapView below:(MGLSymbolStyleLayer *)symbolLayer { + MGLLineStyleLayer *trunkLayer = [[MGLLineStyleLayer alloc] initWithIdentifier:@"trunk-layer" source:_source]; + trunkLayer.sourceLayerIdentifier = @"traffic"; + trunkLayer.predicate = [NSPredicate predicateWithFormat:@"class == 'trunk'"]; + + NSDictionary *trunkLineStopsDictionary = @{ + @7 : [MGLStyleValue valueWithRawValue:@1], + @18 : [MGLStyleValue valueWithRawValue:@24] + }; + + trunkLayer.lineColor = _trafficColor; + trunkLayer.lineWidth = [MGLStyleValue valueWithInterpolationMode: MGLInterpolationModeExponential + cameraStops:trunkLineStopsDictionary + options:@{ + MGLStyleFunctionOptionDefaultValue : [MGLStyleValue valueWithRawValue:@3], + MGLStyleFunctionOptionInterpolationBase : @1.5}]; + [mapView.style insertLayer:trunkLayer belowLayer:symbolLayer]; +} + +- (void)addPrimaryLayerTo:(MGLMapView *)mapView below:(MGLSymbolStyleLayer *)symbolLayer { + MGLLineStyleLayer *primaryLayer = [[MGLLineStyleLayer alloc] initWithIdentifier:@"primary-layer" source:_source]; + primaryLayer.sourceLayerIdentifier = @"traffic"; + primaryLayer.predicate = [NSPredicate predicateWithFormat:@"class == 'primary'"]; + + NSDictionary *primaryLineStopsDictionary = @{ + @7 : [MGLStyleValue valueWithRawValue:@1], + @18 : [MGLStyleValue valueWithRawValue:@24] + }; + + primaryLayer.lineColor = _trafficColor; + primaryLayer.lineWidth = [MGLStyleValue valueWithInterpolationMode: MGLInterpolationModeExponential + cameraStops:primaryLineStopsDictionary + options:@{ + MGLStyleFunctionOptionDefaultValue : [MGLStyleValue valueWithRawValue:@3], + MGLStyleFunctionOptionInterpolationBase : @1.5}]; + [mapView.style insertLayer:primaryLayer belowLayer:symbolLayer]; +} + +- (void)addSecondaryLayerTo:(MGLMapView *)mapView below:(MGLSymbolStyleLayer *)symbolLayer { + MGLLineStyleLayer *secondaryLayer = [[MGLLineStyleLayer alloc] initWithIdentifier:@"secondary-layer" source:_source]; + secondaryLayer.sourceLayerIdentifier = @"traffic"; + secondaryLayer.predicate = [NSPredicate predicateWithFormat:@"class == 'secondary'"]; + + NSDictionary *secondaryLineStopsDictionary = @{ + @7 : [MGLStyleValue valueWithRawValue:@1], + @18 : [MGLStyleValue valueWithRawValue:@24] + }; + + secondaryLayer.lineColor = _trafficColor; + + //TODO: Adjust line width. + secondaryLayer.lineWidth = [MGLStyleValue valueWithInterpolationMode: MGLInterpolationModeExponential + cameraStops:secondaryLineStopsDictionary + options:@{ + MGLStyleFunctionOptionDefaultValue : [MGLStyleValue valueWithRawValue:@3], + MGLStyleFunctionOptionInterpolationBase : @1.5}]; + [mapView.style insertLayer:secondaryLayer belowLayer:symbolLayer]; +} + +- (void)addTertiaryLayerTo:(MGLMapView *)mapView below:(MGLSymbolStyleLayer *)symbolLayer { + MGLLineStyleLayer *tertiaryLayer = [[MGLLineStyleLayer alloc] initWithIdentifier:@"tertiary-layer" source:_source]; + tertiaryLayer.sourceLayerIdentifier = @"traffic"; + tertiaryLayer.predicate = [NSPredicate predicateWithFormat:@"class == 'tertiary'"]; + + NSDictionary *tertiaryLineStopsDictionary = @{ + @7 : [MGLStyleValue valueWithRawValue:@1], + @18 : [MGLStyleValue valueWithRawValue:@24] + }; + + tertiaryLayer.lineColor = _trafficColor; + tertiaryLayer.lineWidth = [MGLStyleValue valueWithInterpolationMode: MGLInterpolationModeExponential + cameraStops:tertiaryLineStopsDictionary + options:@{ + MGLStyleFunctionOptionDefaultValue : [MGLStyleValue valueWithRawValue:@3], + MGLStyleFunctionOptionInterpolationBase : @1.5}]; + [mapView.style insertLayer:tertiaryLayer belowLayer:symbolLayer]; +} + +- (void)addLinkLayerTo:(MGLMapView *)mapView below:(MGLSymbolStyleLayer *)symbolLayer { + MGLLineStyleLayer *linkLayer = [[MGLLineStyleLayer alloc] initWithIdentifier:@"link-layer" source:_source]; + linkLayer.sourceLayerIdentifier = @"traffic"; + linkLayer.predicate = [NSPredicate predicateWithFormat:@"class == 'link'"]; + + NSDictionary *linkLineStopsDictionary = @{ + @7 : [MGLStyleValue valueWithRawValue:@1], + @18 : [MGLStyleValue valueWithRawValue:@24] + }; + + linkLayer.lineColor = _trafficColor; + linkLayer.lineWidth = [MGLStyleValue valueWithInterpolationMode: MGLInterpolationModeExponential + cameraStops:linkLineStopsDictionary + options:@{ + MGLStyleFunctionOptionDefaultValue : [MGLStyleValue valueWithRawValue:@3], + MGLStyleFunctionOptionInterpolationBase : @1.5}]; + [mapView.style insertLayer:linkLayer belowLayer:symbolLayer]; +} + +- (void)addStreetLayerTo:(MGLMapView *)mapView below:(MGLSymbolStyleLayer *)symbolLayer { + MGLLineStyleLayer *streetLayer = [[MGLLineStyleLayer alloc] initWithIdentifier:@"street-layer" source:_source]; + streetLayer.sourceLayerIdentifier = @"traffic"; + streetLayer.predicate = [NSPredicate predicateWithFormat:@"class == 'street'"]; + + NSDictionary *streetLineStopsDictionary = @{ + @7 : [MGLStyleValue valueWithRawValue:@1], + @18 : [MGLStyleValue valueWithRawValue:@24] + }; + + streetLayer.lineColor = _trafficColor; + streetLayer.lineWidth = [MGLStyleValue valueWithInterpolationMode: MGLInterpolationModeExponential + cameraStops:streetLineStopsDictionary + options:@{ + MGLStyleFunctionOptionDefaultValue : [MGLStyleValue valueWithRawValue:@3], + MGLStyleFunctionOptionInterpolationBase : @1.5}]; + [mapView.style insertLayer:streetLayer belowLayer:symbolLayer]; +} + +- (void)addServiceLayerTo:(MGLMapView *)mapView below:(MGLSymbolStyleLayer *)symbolLayer { + MGLLineStyleLayer *serviceLayer = [[MGLLineStyleLayer alloc] initWithIdentifier:@"service-layer" source:_source]; + serviceLayer.sourceLayerIdentifier = @"traffic"; + serviceLayer.predicate = [NSPredicate predicateWithFormat:@"class == 'service'"]; + + NSDictionary *serviceLineStopsDictionary = @{ + @7 : [MGLStyleValue valueWithRawValue:@1], + @18 : [MGLStyleValue valueWithRawValue:@24] + }; + + serviceLayer.lineColor = _trafficColor; + serviceLayer.lineWidth = [MGLStyleValue valueWithInterpolationMode: MGLInterpolationModeExponential + cameraStops:serviceLineStopsDictionary + options:@{ + MGLStyleFunctionOptionDefaultValue : [MGLStyleValue valueWithRawValue:@3], + MGLStyleFunctionOptionInterpolationBase : @1.5}]; + [mapView.style insertLayer:serviceLayer belowLayer:symbolLayer]; +} +// MARK: Traffic Layer Removal +- (void)removeFromMapView:(MGLMapView *)mapView { + +} + + +@end diff --git a/Funhouse/MGLStyleLayer+MBXAdditions.h b/Funhouse/MGLStyleLayer+MBXAdditions.h new file mode 100644 index 0000000..a47ade7 --- /dev/null +++ b/Funhouse/MGLStyleLayer+MBXAdditions.h @@ -0,0 +1,13 @@ +// +// MGLStyleLayer+MBXAdditions.h +// Funhouse +// +// Created by Jordan Kiley on 8/24/17. +// Copyright © 2017 Mapbox. All rights reserved. +// + +#import + +@interface MGLStyleLayer_MBXAdditions : MGLStyleLayer + +@end diff --git a/Funhouse/MGLStyleLayer+MBXAdditions.m b/Funhouse/MGLStyleLayer+MBXAdditions.m new file mode 100644 index 0000000..80937b1 --- /dev/null +++ b/Funhouse/MGLStyleLayer+MBXAdditions.m @@ -0,0 +1,14 @@ +// +// MGLStyleLayer+MBXAdditions.m +// Funhouse +// +// Created by Jordan Kiley on 8/24/17. +// Copyright © 2017 Mapbox. All rights reserved. +// + +#import "MGLStyleLayer+MBXAdditions.h" + +@implementation MGLStyleLayer_MBXAdditions + + +@end diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..90acb14 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,14 @@ +Copyright © 2014–2017, Mapbox + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + diff --git a/MapboxMapsPlugins.podspec b/MapboxMapsPlugins.podspec new file mode 100644 index 0000000..e37e9d2 --- /dev/null +++ b/MapboxMapsPlugins.podspec @@ -0,0 +1,75 @@ +# +# Be sure to run `pod spec lint MapboxPlugins.podspec' to ensure this is a +# valid spec and to remove all comments including this before submitting the spec. +# +# To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html +# To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/ +# + +Pod::Spec.new do |s| + + # ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # + # + # These will help people to find your library, and whilst it + # can feel like a chore to fill in it's definitely to your advantage. The + # summary should be tweet-length, and the description more in depth. + # + + s.name = "MapboxMapsPlugins" + s.version = "0.0.1" + s.summary = "Experimental plugins to supercharge your maps." + + # This description is used to generate tags and improve search results. + # * Think: What does it do? Why did you write it? What is the focus? + # * Try to keep it short, snappy and to the point. + # * Write the description between the DESC delimiters below. + # * Finally, don't worry about the indent, CocoaPods strips it! + s.description = "Add traffic to your Mapbox basemaps." + + s.homepage = "https://github.com/mapbox/mapbox-plugins-ios/" + # s.screenshots = "www.example.com/screenshots_1.gif", "www.example.com/screenshots_2.gif" + + + # ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # + +s.license = { :type => "ISC", :file => "LICENSE.md" } + +# ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # + +s.author = { "Mapbox" => "mobile@mapbox.com" } +s.social_media_url = "https://twitter.com/mapbox" + + # ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― # + # + # If this Pod runs only on iOS or OS X, then specify the platform and + # the deployment target. You can optionally include the target after the platform. + # + + # s.platform = :ios + # s.platform = :ios, "5.0" + + # When using multiple platforms + # s.ios.deployment_target = "5.0" + # s.osx.deployment_target = "10.7" + # s.watchos.deployment_target = "2.0" + # s.tvos.deployment_target = "9.0" + + + # ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # + # + # Specify the location from where the source should be retrieved. + # Supports git, hg, bzr, svn and HTTP. + # + + s.source = { :git => "http://github.com/mapbox/mapbox-plugins-ios.git" + + s.subspec 'Core' do |core| + core.source_files = 'PluginKit/*.h' + core.dependency "Mapbox-iOS-SDK", "~> 3.6" + end + + s.subspec 'Traffic' do |traffic| + traffic.dependency 'MapboxMapsPlugins/Core' + end + +end diff --git a/MapboxPlugins.xcodeproj/project.pbxproj b/MapboxPlugins.xcodeproj/project.pbxproj index 7dba7d2..476bb0a 100644 --- a/MapboxPlugins.xcodeproj/project.pbxproj +++ b/MapboxPlugins.xcodeproj/project.pbxproj @@ -7,6 +7,8 @@ objects = { /* Begin PBXBuildFile section */ + 3EEB5A7F1F4F7F6A008E73B6 /* MBXTrafficPlugin.m in Sources */ = {isa = PBXBuildFile; fileRef = 3EEB5A7E1F4F7F6A008E73B6 /* MBXTrafficPlugin.m */; }; + 3EEB5A821F4F8081008E73B6 /* MGLStyleLayer+MBXAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 3EEB5A811F4F8081008E73B6 /* MGLStyleLayer+MBXAdditions.m */; }; DA8805671ED342F0000CB4A8 /* LocalizationPlugin.h in Headers */ = {isa = PBXBuildFile; fileRef = DA8805651ED342F0000CB4A8 /* LocalizationPlugin.h */; settings = {ATTRIBUTES = (Public, ); }; }; DA88056A1ED342F0000CB4A8 /* LocalizationPlugin.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DA8805631ED342F0000CB4A8 /* LocalizationPlugin.framework */; }; DA88056B1ED342F0000CB4A8 /* LocalizationPlugin.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = DA8805631ED342F0000CB4A8 /* LocalizationPlugin.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; @@ -70,6 +72,10 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 3EEB5A7D1F4F7F6A008E73B6 /* MBXTrafficPlugin.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MBXTrafficPlugin.h; sourceTree = ""; }; + 3EEB5A7E1F4F7F6A008E73B6 /* MBXTrafficPlugin.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MBXTrafficPlugin.m; sourceTree = ""; }; + 3EEB5A801F4F8081008E73B6 /* MGLStyleLayer+MBXAdditions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MGLStyleLayer+MBXAdditions.h"; sourceTree = ""; }; + 3EEB5A811F4F8081008E73B6 /* MGLStyleLayer+MBXAdditions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "MGLStyleLayer+MBXAdditions.m"; sourceTree = ""; }; DA8805631ED342F0000CB4A8 /* LocalizationPlugin.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = LocalizationPlugin.framework; sourceTree = BUILT_PRODUCTS_DIR; }; DA8805651ED342F0000CB4A8 /* LocalizationPlugin.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LocalizationPlugin.h; sourceTree = ""; }; DA8805661ED342F0000CB4A8 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -125,6 +131,18 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 3EEB5A7C1F4F7ED9008E73B6 /* TrafficPlugin */ = { + isa = PBXGroup; + children = ( + 3EEB5A7D1F4F7F6A008E73B6 /* MBXTrafficPlugin.h */, + 3EEB5A7E1F4F7F6A008E73B6 /* MBXTrafficPlugin.m */, + 3EEB5A801F4F8081008E73B6 /* MGLStyleLayer+MBXAdditions.h */, + 3EEB5A811F4F8081008E73B6 /* MGLStyleLayer+MBXAdditions.m */, + ); + name = TrafficPlugin; + path = Funhouse; + sourceTree = ""; + }; DA8805641ED342F0000CB4A8 /* LocalizationPlugin */ = { isa = PBXGroup; children = ( @@ -160,6 +178,7 @@ children = ( DAF50B251ECA15B50044B316 /* TestApp */, DA8805641ED342F0000CB4A8 /* LocalizationPlugin */, + 3EEB5A7C1F4F7ED9008E73B6 /* TrafficPlugin */, DA8805791ED34744000CB4A8 /* PluginKit */, DAF50B241ECA15B50044B316 /* Products */, DA88058C1ED3950D000CB4A8 /* Frameworks */, @@ -275,6 +294,7 @@ DAF50B211ECA15B50044B316 /* Resources */, DA88056F1ED342F0000CB4A8 /* Embed Frameworks */, DA8805901ED39532000CB4A8 /* Copy Frameworks */, + 3E0EC6281F55D2D8006BC03F /* ShellScript */, ); buildRules = ( ); @@ -353,6 +373,19 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ + 3E0EC6281F55D2D8006BC03F /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "$SRCROOT/insert-mapbox-token.sh"; + }; DA8805901ED39532000CB4A8 /* Copy Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -406,10 +439,12 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 3EEB5A821F4F8081008E73B6 /* MGLStyleLayer+MBXAdditions.m in Sources */, DAF50B2B1ECA15B50044B316 /* AppDelegate.m in Sources */, DA88058A1ED34CD2000CB4A8 /* PluginTableViewController.m in Sources */, DAF50B2E1ECA15B50044B316 /* MasterViewController.m in Sources */, DAF50B281ECA15B50044B316 /* main.m in Sources */, + 3EEB5A7F1F4F7F6A008E73B6 /* MBXTrafficPlugin.m in Sources */, DAF50B311ECA15B50044B316 /* MapViewController.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/TestApp/Base.lproj/Main.storyboard b/TestApp/Base.lproj/Main.storyboard index d997344..ddf2a81 100644 --- a/TestApp/Base.lproj/Main.storyboard +++ b/TestApp/Base.lproj/Main.storyboard @@ -1,11 +1,11 @@ - + - + @@ -15,7 +15,7 @@ - + @@ -95,7 +95,7 @@