Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Commit e6e9b22

Browse files
committed
[ios, macos] Update changelogs
1 parent 25635a5 commit e6e9b22

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

platform/darwin/src/MGLPolyline.mm

+11-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,17 @@ - (BOOL)isEqual:(id)other {
5555

5656
- (CLLocationCoordinate2D)coordinate {
5757
mbgl::Polygon<double> polyline;
58-
polyline.push_back([self lineString]);
58+
59+
NSUInteger count = self.pointCount;
60+
CLLocationCoordinate2D *coordinates = self.coordinates;
61+
62+
mbgl::LinearRing<double> geometry;
63+
geometry.reserve(self.pointCount);
64+
for (NSUInteger i = 0; i < count; i++) {
65+
geometry.push_back(mbgl::Point<double>(coordinates[i].longitude, coordinates[i].latitude));
66+
}
67+
68+
polyline.push_back(geometry);
5969

6070
// pole of inaccessibility
6171
auto poi = mapbox::polylabel(polyline);

platform/ios/CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONT
2626
### Other changes
2727

2828
* Xcode 8.0 or higher is now recommended for using this SDK. ([#8775](https://github.com/mapbox/mapbox-gl-native/pull/8775))
29+
* Fixed a crash when calling `MGLMultiPolygon.coordinate` [#8713](https://github.com/mapbox/mapbox-gl-native/pull/8713)
2930
* Updated MGLMapView’s logo view to display [the new Mapbox logo](https://www.mapbox.com/blog/new-mapbox-logo/). ([#8771](https://github.com/mapbox/mapbox-gl-native/pull/8771), [#8773](https://github.com/mapbox/mapbox-gl-native/pull/8773))
3031
* 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))
3132
* 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))

platform/macos/CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
### Other changes
1515

1616
* Xcode 8.0 or higher is now recommended for using this SDK. ([#8775](https://github.com/mapbox/mapbox-gl-native/pull/8775))
17+
* Fixed a crash when calling `MGLMultiPolygon.coordinate` [#8713](https://github.com/mapbox/mapbox-gl-native/pull/8713)
1718
* Updated MGLMapView’s logo view to display [the new Mapbox logo](https://www.mapbox.com/blog/new-mapbox-logo/). ([#8771](https://github.com/mapbox/mapbox-gl-native/pull/8771), [#8773](https://github.com/mapbox/mapbox-gl-native/pull/8773))
1819
* Fixed an issue causing attribution button text to appear blue instead of black. ([#8701](https://github.com/mapbox/mapbox-gl-native/pull/8701))
1920
* 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))

0 commit comments

Comments
 (0)