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

[ios] Fix iosapp runtime styling examples #7395

Merged
merged 1 commit into from
Dec 13, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions platform/ios/app/MBXViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,12 @@ - (void)styleRoadLayer
{
MGLLineStyleLayer *roadLayer = (MGLLineStyleLayer *)[self.mapView.style layerWithIdentifier:@"road-primary"];
roadLayer.lineColor = [MGLStyleValue<UIColor *> valueWithRawValue:[UIColor blackColor]];
MGLStyleValue *lineWidthFunction = [MGLStyleValue<NSNumber *> valueWithStops:@{}];

MGLStyleValue *lineWidthFunction = [MGLStyleValue<NSNumber *> valueWithStops:@{
@5: [MGLStyleValue<NSNumber *> valueWithRawValue:@5],
@10: [MGLStyleValue<NSNumber *> valueWithRawValue:@15],
@15: [MGLStyleValue<NSNumber *> valueWithRawValue:@30],
}];

MGLStyleValue *roadLineColor = [MGLStyleValue<UIColor *> valueWithStops:@{
@10: [MGLStyleValue<UIColor *> valueWithRawValue:[UIColor purpleColor]],
Expand Down Expand Up @@ -1156,7 +1161,7 @@ - (void)styleRouteLine
baseRouteLayer.lineJoin = [MGLStyleConstantValue valueWithRawValue:[NSValue valueWithMGLLineJoin:MGLLineJoinRound]];
[self.mapView.style addLayer:baseRouteLayer];

MGLLineStyleLayer *routeLayer = [[MGLLineStyleLayer alloc] initWithIdentifier:@"style-base-route-layer" source:routeSource];
MGLLineStyleLayer *routeLayer = [[MGLLineStyleLayer alloc] initWithIdentifier:@"style-route-layer" source:routeSource];
routeLayer.lineColor = [MGLStyleConstantValue valueWithRawValue:[UIColor whiteColor]];
routeLayer.lineWidth = [MGLStyleConstantValue valueWithRawValue:@15];
routeLayer.lineOpacity = [MGLStyleConstantValue valueWithRawValue:@0.8];
Expand Down