[ios] Set default polyline and polygon color to the map view tint color
Fixes #3927
This commit is contained in:
@@ -51,6 +51,8 @@ Known issues:
|
||||
|
||||
## iOS master
|
||||
|
||||
- Polygons and polylines now default to using the map view's tint color. ([#4028](https://github.com/mapbox/mapbox-gl-native/pull/4028))
|
||||
|
||||
## iOS 3.1.0
|
||||
|
||||
- The SDK is now distributed as a dynamic framework instead of a static library, resulting in a simpler installation workflow and significantly reduced download size. The framework contains both simulator and device content; due to [an Xcode bug](http://www.openradar.me/radar?id=6409498411401216), you’ll need to strip out the simulator content before submitting your application to the App Store. ([#3183](https://github.com/mapbox/mapbox-gl-native/pull/3183))
|
||||
|
||||
@@ -1133,7 +1133,7 @@ IB_DESIGNABLE
|
||||
- (CGFloat)mapView:(MGLMapView *)mapView alphaForShapeAnnotation:(MGLShape *)annotation;
|
||||
|
||||
/**
|
||||
Returns the stroke color to use when rendering a shape annotation. Defaults to black.
|
||||
Returns the stroke color to use when rendering a shape annotation. Defaults to the map view’s tint color.
|
||||
|
||||
@param mapView The map view rendering the shape annotation.
|
||||
@param annotation The annotation being rendered.
|
||||
@@ -1142,7 +1142,7 @@ IB_DESIGNABLE
|
||||
- (UIColor *)mapView:(MGLMapView *)mapView strokeColorForShapeAnnotation:(MGLShape *)annotation;
|
||||
|
||||
/**
|
||||
Returns the fill color to use when rendering a polygon annotation. Defaults to blue.
|
||||
Returns the fill color to use when rendering a polygon annotation. Defaults to the map view’s tint color.
|
||||
|
||||
@param mapView The map view rendering the polygon annotation.
|
||||
@param annotation The annotation being rendered.
|
||||
|
||||
@@ -2469,7 +2469,7 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration)
|
||||
{
|
||||
UIColor *color = (_delegateHasStrokeColorsForShapeAnnotations
|
||||
? [self.delegate mapView:self strokeColorForShapeAnnotation:annotation]
|
||||
: [UIColor blackColor]);
|
||||
: self.tintColor);
|
||||
return MGLColorObjectFromUIColor(color);
|
||||
}
|
||||
|
||||
@@ -2477,7 +2477,7 @@ mbgl::Duration MGLDurationInSeconds(NSTimeInterval duration)
|
||||
{
|
||||
UIColor *color = (_delegateHasFillColorsForShapeAnnotations
|
||||
? [self.delegate mapView:self fillColorForPolygonAnnotation:annotation]
|
||||
: [UIColor blueColor]);
|
||||
: self.tintColor);
|
||||
return MGLColorObjectFromUIColor(color);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user