This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
CLLocationCoordinate2D array parameters should be constant #7214
Labels
annotations
Annotations on iOS and macOS or markers on Android
iOS
Mapbox Maps SDK for iOS
macOS
Mapbox Maps SDK for macOS
MapKit parity
For feature parity with MapKit on iOS or macOS
Milestone
Various geometry classes like MGLPolyline have methods that take C arrays of
CLLocationCoordinate2D
s. In iOS 10.0, the analogous parameters in MapKit have changed to beconst
, because constant C arrays have more convenient bridging in Swift 3 –UnsafePointer<CLLocationCoordinate2D>
instead ofUnsafeMutablePointer<CLLocationCoordinate2D>
. The following symbols should follow suit:-[MGLMapView setVisibleCoordinates:count:edgePadding:animated:]
-[MGLMapView setVisibleCoordinates:count:edgePadding:direction:duration:animationTimingFunction:completionHandler:]
-[MGLMultiPoint replaceCoordinatesInRange:withCoordinates:]
-[MGLMultiPoint appendCoordinates:count:]
+[MGLPointCollection pointCollectionWithCoordinates:count:]
+[MGLPolygon polygonWithCoordinates:count:]
+[MGLPolygon polygonWithCoordinates:count:interiorPolygons:]
+[MGLPolyline polylineWithCoordinates:count:]
Application code in Swift will be able to pass in a reference to a
let
instead of avar
, but existing code will compile without errors. For application code in Objective-C, there should be no difference due to this change. So I don’t think it would be considered backwards incompatible./cc @boundsj @danpat
The text was updated successfully, but these errors were encountered: