diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2017-02-07 18:26:49 -0800 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2017-02-08 16:54:09 -0800 |
commit | 360e5bf631229e2aec71780a515a42e32d4c28e6 (patch) | |
tree | ea53e5f0f96b79418c4edfa1261057f08d8da573 /platform/macos/app | |
parent | bd2f3a28a5d401ad41a5353c662c2f739cb34fc9 (diff) | |
download | qtlocation-mapboxgl-360e5bf631229e2aec71780a515a42e32d4c28e6.tar.gz |
[ios, macos] Fixed runtime styling deprecation warnings
Diffstat (limited to 'platform/macos/app')
-rw-r--r-- | platform/macos/app/MapDocument.m | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/platform/macos/app/MapDocument.m b/platform/macos/app/MapDocument.m index 62ddd2ce60..6f63542527 100644 --- a/platform/macos/app/MapDocument.m +++ b/platform/macos/app/MapDocument.m @@ -689,11 +689,11 @@ NS_ARRAY_OF(id <MGLAnnotation>) *MBXFlattenedShapes(NS_ARRAY_OF(id <MGLAnnotatio MGLFillStyleLayer *fillStyleLayer = (MGLFillStyleLayer *)[self.mapView.style layerWithIdentifier:@"water"]; - MGLStyleValue *colorFunction = [MGLStyleValue<NSColor *> valueWithStops:@{ + MGLStyleValue *colorFunction = [MGLStyleValue<NSColor *> valueWithInterpolationMode:MGLInterpolationModeExponential cameraStops:@{ @0.0: [MGLStyleValue<NSColor *> valueWithRawValue:[NSColor redColor]], @10.0: [MGLStyleValue<NSColor *> valueWithRawValue:[NSColor yellowColor]], @20.0: [MGLStyleValue<NSColor *> valueWithRawValue:[NSColor blackColor]], - }]; + } options:nil]; fillStyleLayer.fillColor = colorFunction; NSString *filePath = [[NSBundle bundleForClass:self.class] pathForResource:@"amsterdam" ofType:@"geojson"]; @@ -715,11 +715,11 @@ NS_ARRAY_OF(id <MGLAnnotation>) *MBXFlattenedShapes(NS_ARRAY_OF(id <MGLAnnotatio theaterLayer.predicate = [NSPredicate predicateWithFormat:@"maki == 'theatre'"]; theaterLayer.iconImageName = [MGLStyleValue valueWithRawValue:NSImageNameIChatTheaterTemplate]; theaterLayer.iconScale = [MGLStyleValue valueWithRawValue:@2]; - theaterLayer.iconColor = [MGLStyleValue valueWithStops:@{ + theaterLayer.iconColor = [MGLStyleValue valueWithInterpolationMode:MGLInterpolationModeExponential cameraStops:@{ @16.0: [MGLStyleValue valueWithRawValue:[NSColor redColor]], @18.0: [MGLStyleValue valueWithRawValue:[NSColor yellowColor]], @20.0: [MGLStyleValue valueWithRawValue:[NSColor blackColor]], - }]; + } options:nil]; [self.mapView.style addLayer:theaterLayer]; } @@ -1080,14 +1080,14 @@ NS_ARRAY_OF(id <MGLAnnotation>) *MBXFlattenedShapes(NS_ARRAY_OF(id <MGLAnnotatio - (void)mapView:(MGLMapView *)mapView didSelectAnnotation:(id <MGLAnnotation>)annotation { if ([annotation isKindOfClass:[DroppedPinAnnotation class]]) { - DroppedPinAnnotation *droppedPin = annotation; + DroppedPinAnnotation *droppedPin = (DroppedPinAnnotation *)annotation; [droppedPin resume]; } } - (void)mapView:(MGLMapView *)mapView didDeselectAnnotation:(id <MGLAnnotation>)annotation { if ([annotation isKindOfClass:[DroppedPinAnnotation class]]) { - DroppedPinAnnotation *droppedPin = annotation; + DroppedPinAnnotation *droppedPin = (DroppedPinAnnotation *)annotation; [droppedPin pause]; } } |