summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Wray <jason@mapbox.com>2016-02-18 17:26:11 -0500
committerJason Wray <jason@mapbox.com>2016-02-18 19:23:15 -0500
commit390057b5691f69f4b2f2f9eeb9e654990adb9e80 (patch)
treee0e4beeaead9245ac75a4363ad5421134bb7fba9
parent9c26f063187b129218910dbb86eb21215a2cdf40 (diff)
downloadqtlocation-mapboxgl-390057b5691f69f4b2f2f9eeb9e654990adb9e80.tar.gz
[ios] Set default polyline and polygon color to the map view tint color
Fixes #3927
-rw-r--r--CHANGELOG.md2
-rw-r--r--platform/ios/include/MGLMapView.h4
-rw-r--r--platform/ios/src/MGLMapView.mm4
3 files changed, 6 insertions, 4 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f70cf17b4b..8d403d5ad3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -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))
diff --git a/platform/ios/include/MGLMapView.h b/platform/ios/include/MGLMapView.h
index dc03c13f7b..d974f4673e 100644
--- a/platform/ios/include/MGLMapView.h
+++ b/platform/ios/include/MGLMapView.h
@@ -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.
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm
index 748bfc7414..1d5eb2ea77 100644
--- a/platform/ios/src/MGLMapView.mm
+++ b/platform/ios/src/MGLMapView.mm
@@ -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);
}