[ios] Set default polyline and polygon color to the map view tint color

Fixes #3927
This commit is contained in:
Jason Wray
2016-02-18 17:26:11 -05:00
parent 9c26f06318
commit 390057b569
3 changed files with 6 additions and 4 deletions

View File

@@ -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))

View File

@@ -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.

View File

@@ -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);
}