summaryrefslogtreecommitdiff
path: root/platform/macos/app/MapDocument.m
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2016-09-25 12:37:45 -0700
committerMinh Nguyễn <mxn@1ec5.org>2016-10-17 11:47:22 -0700
commit9652028915af6602626939e0b0075333c34bfbfe (patch)
tree0b299507c1339dcb1f947a496dcd375095f9bc4b /platform/macos/app/MapDocument.m
parent0c8a3feffa94a9594bcaa77fdc18d11a3c482ff5 (diff)
downloadqtlocation-mapboxgl-9652028915af6602626939e0b0075333c34bfbfe.tar.gz
[ios, macos] Expand changes to entire API
Diffstat (limited to 'platform/macos/app/MapDocument.m')
-rw-r--r--platform/macos/app/MapDocument.m13
1 files changed, 6 insertions, 7 deletions
diff --git a/platform/macos/app/MapDocument.m b/platform/macos/app/MapDocument.m
index 505678fcc2..e4fe202f3f 100644
--- a/platform/macos/app/MapDocument.m
+++ b/platform/macos/app/MapDocument.m
@@ -494,12 +494,11 @@ NS_ARRAY_OF(id <MGLAnnotation>) *MBXFlattenedShapes(NS_ARRAY_OF(id <MGLAnnotatio
- (IBAction)manipulateStyle:(id)sender {
MGLFillStyleLayer *fillStyleLayer = (MGLFillStyleLayer *)[self.mapView.style layerWithIdentifier:@"water"];
- MGLStyleAttributeFunction *colorFunction = [[MGLStyleAttributeFunction alloc] init];
- colorFunction.stops = @{
- @0.0: [NSColor redColor],
- @10.0: [NSColor yellowColor],
- @20.0: [NSColor blackColor],
- };
+ MGLStyleValue *colorFunction = [MGLStyleValue<NSColor *> valueWithStops:@{
+ @0.0: [MGLStyleValue<NSColor *> valueWithRawValue:[NSColor redColor]],
+ @10.0: [MGLStyleValue<NSColor *> valueWithRawValue:[NSColor yellowColor]],
+ @20.0: [MGLStyleValue<NSColor *> valueWithRawValue:[NSColor blackColor]],
+ }];
fillStyleLayer.fillColor = colorFunction;
NSString *filePath = [[NSBundle bundleForClass:self.class] pathForResource:@"amsterdam" ofType:@"geojson"];
@@ -508,7 +507,7 @@ NS_ARRAY_OF(id <MGLAnnotation>) *MBXFlattenedShapes(NS_ARRAY_OF(id <MGLAnnotatio
[self.mapView.style addSource:source];
MGLFillStyleLayer *fillLayer = [[MGLFillStyleLayer alloc] initWithIdentifier:@"test" source:source];
- fillLayer.fillColor = [NSColor greenColor];
+ fillLayer.fillColor = [MGLStyleValue<NSColor *> valueWithRawValue:[NSColor greenColor]];
fillLayer.predicate = [NSPredicate predicateWithFormat:@"%K == %@", @"type", @"park"];
[self.mapView.style addLayer:fillLayer];
}