diff --git a/platform/darwin/src/MGLMultiPoint_Private.h b/platform/darwin/src/MGLMultiPoint_Private.h index 3da4c0bbb..aa52a02fc 100644 --- a/platform/darwin/src/MGLMultiPoint_Private.h +++ b/platform/darwin/src/MGLMultiPoint_Private.h @@ -30,7 +30,7 @@ NS_ASSUME_NONNULL_BEGIN @protocol MGLMultiPointDelegate /** Returns the fill alpha value for the given annotation. */ -- (float)alphaForShapeAnnotation:(MGLShape *)annotation; +- (double)alphaForShapeAnnotation:(MGLShape *)annotation; /** Returns the stroke color object for the given annotation. */ - (mbgl::Color)strokeColorForShapeAnnotation:(MGLShape *)annotation; @@ -39,7 +39,7 @@ NS_ASSUME_NONNULL_BEGIN - (mbgl::Color)fillColorForPolygonAnnotation:(MGLPolygon *)annotation; /** Returns the stroke width object for the given annotation. */ -- (float)lineWidthForPolylineAnnotation:(MGLPolyline *)annotation; +- (CGFloat)lineWidthForPolylineAnnotation:(MGLPolyline *)annotation; @end diff --git a/platform/darwin/src/MGLPolygon.mm b/platform/darwin/src/MGLPolygon.mm index 3829adf67..b8f02b640 100644 --- a/platform/darwin/src/MGLPolygon.mm +++ b/platform/darwin/src/MGLPolygon.mm @@ -44,7 +44,7 @@ } mbgl::FillAnnotation annotation { geometry }; - annotation.opacity = { [delegate alphaForShapeAnnotation:self] }; + annotation.opacity = { static_cast([delegate alphaForShapeAnnotation:self]) }; annotation.outlineColor = { [delegate strokeColorForShapeAnnotation:self] }; annotation.color = { [delegate fillColorForPolygonAnnotation:self] }; diff --git a/platform/darwin/src/MGLPolyline.mm b/platform/darwin/src/MGLPolyline.mm index 9f6f6c354..b81147a3b 100644 --- a/platform/darwin/src/MGLPolyline.mm +++ b/platform/darwin/src/MGLPolyline.mm @@ -24,9 +24,9 @@ } mbgl::LineAnnotation annotation { geometry }; - annotation.opacity = { [delegate alphaForShapeAnnotation:self] }; + annotation.opacity = { static_cast([delegate alphaForShapeAnnotation:self]) }; annotation.color = { [delegate strokeColorForShapeAnnotation:self] }; - annotation.width = { [delegate lineWidthForPolylineAnnotation:self] }; + annotation.width = { static_cast([delegate lineWidthForPolylineAnnotation:self]) }; return annotation; } diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index 858ea11a9..28b030b7d 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -3033,13 +3033,13 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration) return annotationContext.annotationView; } -- (float)alphaForShapeAnnotation:(MGLShape *)annotation +- (double)alphaForShapeAnnotation:(MGLShape *)annotation { if (_delegateHasAlphasForShapeAnnotations) { return [self.delegate mapView:self alphaForShapeAnnotation:annotation]; } - return 1.0f; + return 1.0; } - (mbgl::Color)strokeColorForShapeAnnotation:(MGLShape *)annotation @@ -3058,13 +3058,13 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration) return MGLColorObjectFromUIColor(color); } -- (float)lineWidthForPolylineAnnotation:(MGLPolyline *)annotation +- (CGFloat)lineWidthForPolylineAnnotation:(MGLPolyline *)annotation { if (_delegateHasLineWidthsForShapeAnnotations) { return [self.delegate mapView:self lineWidthForPolylineAnnotation:(MGLPolyline *)annotation]; } - return 3.0f; + return 3.0; } - (void)installAnnotationImage:(MGLAnnotationImage *)annotationImage diff --git a/platform/ios/src/MGLMapViewDelegate.h b/platform/ios/src/MGLMapViewDelegate.h index ed698462c..12a0658a5 100644 --- a/platform/ios/src/MGLMapViewDelegate.h +++ b/platform/ios/src/MGLMapViewDelegate.h @@ -247,7 +247,7 @@ NS_ASSUME_NONNULL_BEGIN @param annotation The annotation being rendered. @return A line width for the polyline, measured in points. */ -- (float)mapView:(MGLMapView *)mapView lineWidthForPolylineAnnotation:(MGLPolyline *)annotation; +- (CGFloat)mapView:(MGLMapView *)mapView lineWidthForPolylineAnnotation:(MGLPolyline *)annotation; #pragma mark Managing Annotation Views diff --git a/platform/macos/src/MGLMapView.mm b/platform/macos/src/MGLMapView.mm index 91cd38563..5785f56e0 100644 --- a/platform/macos/src/MGLMapView.mm +++ b/platform/macos/src/MGLMapView.mm @@ -2097,11 +2097,11 @@ public: #pragma mark MGLMultiPointDelegate methods -- (float)alphaForShapeAnnotation:(MGLShape *)annotation { +- (double)alphaForShapeAnnotation:(MGLShape *)annotation { if (_delegateHasAlphasForShapeAnnotations) { return [self.delegate mapView:self alphaForShapeAnnotation:annotation]; } - return 1.0f; + return 1.0; } - (mbgl::Color)strokeColorForShapeAnnotation:(MGLShape *)annotation { @@ -2118,11 +2118,11 @@ public: return MGLColorObjectFromNSColor(color); } -- (float)lineWidthForPolylineAnnotation:(MGLPolyline *)annotation { +- (CGFloat)lineWidthForPolylineAnnotation:(MGLPolyline *)annotation { if (_delegateHasLineWidthsForShapeAnnotations) { return [self.delegate mapView:self lineWidthForPolylineAnnotation:(MGLPolyline *)annotation]; } - return 3.0f; + return 3.0; } #pragma mark MGLPopoverDelegate methods diff --git a/platform/macos/src/MGLMapViewDelegate.h b/platform/macos/src/MGLMapViewDelegate.h index 048cd0b62..6ea69f845 100644 --- a/platform/macos/src/MGLMapViewDelegate.h +++ b/platform/macos/src/MGLMapViewDelegate.h @@ -174,7 +174,7 @@ NS_ASSUME_NONNULL_BEGIN @param annotation The annotation being rendered. @return A line width for the polyline, measured in points. */ -- (float)mapView:(MGLMapView *)mapView lineWidthForPolylineAnnotation:(MGLPolyline *)annotation; +- (CGFloat)mapView:(MGLMapView *)mapView lineWidthForPolylineAnnotation:(MGLPolyline *)annotation; #pragma mark Selecting Annotations