summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEimantas Vaiciunas <eimantas@walkingsmarts.com>2017-05-12 08:20:06 +0300
committerMinh Nguyễn <mxn@1ec5.org>2017-05-20 19:55:04 -0700
commitb0b21a25ffbba15c0c43df9513d008f04eb38bfc (patch)
tree312ec62015adb1eaf5d980f2e195e5eaeed38450
parent9e25f3363b3c429484ade48d5ff8781026adcf89 (diff)
downloadqtlocation-mapboxgl-b0b21a25ffbba15c0c43df9513d008f04eb38bfc.tar.gz
Make `overlays` property `nonnull` on iOS
-rw-r--r--platform/ios/CHANGELOG.md1
-rw-r--r--platform/ios/src/MGLMapView.h4
-rw-r--r--platform/ios/src/MGLMapView.mm4
3 files changed, 5 insertions, 4 deletions
diff --git a/platform/ios/CHANGELOG.md b/platform/ios/CHANGELOG.md
index e8de9e3723..5314faa328 100644
--- a/platform/ios/CHANGELOG.md
+++ b/platform/ios/CHANGELOG.md
@@ -36,6 +36,7 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONT
* Fixed a crash or console spew when MGLMapView is initialized with a frame smaller than 64 points wide by 64 points tall. ([#8562](https://github.com/mapbox/mapbox-gl-native/pull/8562))
* The error passed into `-[MGLMapViewDelegate mapViewDidFailLoadingMap:withError:]` now includes a more specific description and failure reason. ([#8418](https://github.com/mapbox/mapbox-gl-native/pull/8418))
* Fixed an issue rendering polylines that contain duplicate vertices. ([#8808](https://github.com/mapbox/mapbox-gl-native/pull/8808))
+* Added non-null `overlays` property to `MGLMapView`. ([#8617](https://github.com/mapbox/mapbox-gl-native/pull/8617))
## 3.5.4 - May 9, 2017
diff --git a/platform/ios/src/MGLMapView.h b/platform/ios/src/MGLMapView.h
index 93fd681e39..ca765a046b 100644
--- a/platform/ios/src/MGLMapView.h
+++ b/platform/ios/src/MGLMapView.h
@@ -1135,9 +1135,9 @@ IB_DESIGNABLE
The objects in this array must adopt the `MGLOverlay` protocol. If no
overlays are associated with the map view, the value of this property is
- `nil`.
+ empty array.
*/
-@property (nonatomic, readonly, nullable) NS_ARRAY_OF(id <MGLOverlay>) *overlays;
+@property (nonatomic, readonly, nonnull) NS_ARRAY_OF(id <MGLOverlay>) *overlays;
/**
Adds a single overlay object to the map.
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm
index 8783a756a6..748ab27440 100644
--- a/platform/ios/src/MGLMapView.mm
+++ b/platform/ios/src/MGLMapView.mm
@@ -3531,9 +3531,9 @@ public:
}
}
-- (nullable NS_ARRAY_OF(id <MGLOverlay>) *)overlays
+- (nonnull NS_ARRAY_OF(id <MGLOverlay>) *)overlays
{
- if (self.annotations == nil) { return nil; }
+ if (self.annotations == nil) { return @[]; }
NS_MUTABLE_ARRAY_OF(id <MGLOverlay>) *mutableOverlays = [NSMutableArray new];