diff options
-rw-r--r-- | platform/darwin/src/MGLMultiPoint_Private.h | 4 | ||||
-rw-r--r-- | platform/darwin/src/MGLPolygon.mm | 2 | ||||
-rw-r--r-- | platform/darwin/src/MGLPolyline.mm | 4 | ||||
-rw-r--r-- | platform/ios/src/MGLMapView.mm | 8 | ||||
-rw-r--r-- | platform/ios/src/MGLMapViewDelegate.h | 2 | ||||
-rw-r--r-- | platform/macos/src/MGLMapView.mm | 8 | ||||
-rw-r--r-- | platform/macos/src/MGLMapViewDelegate.h | 2 |
7 files changed, 15 insertions, 15 deletions
diff --git a/platform/darwin/src/MGLMultiPoint_Private.h b/platform/darwin/src/MGLMultiPoint_Private.h index 3da4c0bbb5..aa52a02fcb 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 <NSObject> /** 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 3829adf675..b8f02b6406 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<float>([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 9f6f6c3542..b81147a3ba 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<float>([delegate alphaForShapeAnnotation:self]) }; annotation.color = { [delegate strokeColorForShapeAnnotation:self] }; - annotation.width = { [delegate lineWidthForPolylineAnnotation:self] }; + annotation.width = { static_cast<float>([delegate lineWidthForPolylineAnnotation:self]) }; return annotation; } diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index 858ea11a98..28b030b7dd 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 ed698462c7..12a0658a51 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 91cd385638..5785f56e01 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 048cd0b62d..6ea69f845a 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 |