diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-07-14 16:18:59 +0300 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-07-14 16:27:25 +0300 |
commit | 44406e91de97132e18494fb1d3353ce00726f192 (patch) | |
tree | 676f327f04eac880c93c480c4a91e5dcf3210d80 /platform/macos | |
parent | 9ef30c23527ef0e8dfe4a7b486624a284ccc016a (diff) | |
download | qtlocation-mapboxgl-44406e91de97132e18494fb1d3353ce00726f192.tar.gz |
[ios,macos] Partially revert 06af75
Use static_cast<float> to convert from CGfloat when creating
PropertyValue<float> and avoid breaking backwards-compatibility.
Diffstat (limited to 'platform/macos')
-rw-r--r-- | platform/macos/src/MGLMapView.mm | 8 | ||||
-rw-r--r-- | platform/macos/src/MGLMapViewDelegate.h | 2 |
2 files changed, 5 insertions, 5 deletions
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 |