summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorJesse Bounds <jesse@rebounds.net>2016-12-13 10:09:54 -0800
committerGitHub <noreply@github.com>2016-12-13 10:09:54 -0800
commit9f4dd1c5f46ebc7915118d278f25b323c11c9b81 (patch)
tree6c3ff5f4855bda83871c7cd9e44730320bb7159c /platform
parentd3895b47efc28aa63b941de4341c4cb6fd6fb477 (diff)
downloadqtlocation-mapboxgl-9f4dd1c5f46ebc7915118d278f25b323c11c9b81.tar.gz
[ios] Fix iosapp runtime styling examples (#7395)
This fixes a few bugs in our iosapp examples that were exposed by recent refinements to the APIs they use.
Diffstat (limited to 'platform')
-rw-r--r--platform/ios/app/MBXViewController.m9
1 files changed, 7 insertions, 2 deletions
diff --git a/platform/ios/app/MBXViewController.m b/platform/ios/app/MBXViewController.m
index 9b3d003e23..12b700049c 100644
--- a/platform/ios/app/MBXViewController.m
+++ b/platform/ios/app/MBXViewController.m
@@ -733,7 +733,12 @@ typedef NS_ENUM(NSInteger, MBXSettingsMiscellaneousRows) {
{
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]],
@@ -1156,7 +1161,7 @@ typedef NS_ENUM(NSInteger, MBXSettingsMiscellaneousRows) {
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];