You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
Some of the methods taking an C array of CLLocationCoordinate2D feels unnatural in swift, for instance - (void)setVisibleCoordinates:(const CLLocationCoordinate2D *)coordinates count:(NSUInteger)count edgePadding:(UIEdgeInsets)insets animated:(BOOL)animated will get translated to swift as: setVisibleCoordinates(UnsafePointer<CLLocationCoordinate2D>, count: UInt, edgePadding: UIEdgeInsets, animated: Bool)
Any plans to provide some swift shims to improve the ergonomics here? Maybe something like:
Any plans to provide some swift shims to improve the ergonomics here?
We aren’t planning to incorporate Swift code directly into the map SDK proper until we can take advantage of Swift 5’s ABI stability, which will eventually require dropping support for iOS versions older than 12.2.
A separate library (or plugin, if you will) that implements these shims might be a worthwhile improvement in the meantime. We’d be happy to see someone like yourself run with that idea.
In this particular case, it might be possible for the map SDK proper to vend a -setVisibleCoordinateValues:edgePadding:animated: method that takes an NSArray of NSValues. However, that would shift type checking to runtime, which may not be prudent.
Some of the methods taking an C array of CLLocationCoordinate2D feels unnatural in swift, for instance
- (void)setVisibleCoordinates:(const CLLocationCoordinate2D *)coordinates count:(NSUInteger)count edgePadding:(UIEdgeInsets)insets animated:(BOOL)animated
will get translated to swift as:setVisibleCoordinates(UnsafePointer<CLLocationCoordinate2D>, count: UInt, edgePadding: UIEdgeInsets, animated: Bool)
Any plans to provide some swift shims to improve the ergonomics here? Maybe something like:
slightly related as it lists affected methods: #7214
The text was updated successfully, but these errors were encountered: