So based on how my app functions I need to be able to draw the polygon annotation using an array of CGPoints. This works fine by default in the 2.0 SDK, but in version 1.6 the polygon's initialization method wants an array of CLLocation objects.
So I need to convert my CGPoints to CLLocation objects or CLLocationCoordinate2D's
But it seems kind of foolish to use MapKit and initialize an MKMapView that no one will ever see just so I can utilize this one function, and now that I think about it there's no way to guarantee that the MKMapView would be in sync with the real RMMapView so this workaround would be unreliable anyways.
I've been looking through the mapbox legacy API docs and can't seem to find a similar function, so I'm hoping that one exists and I've simply made a mistake.
Is there any way to convert a CGPoint to a CLLocation or CLLocationCoordinate2D using the mapbox legacy iOS SDK?
So based on how my app functions I need to be able to draw the polygon annotation using an array of
CGPoints
. This works fine by default in the 2.0 SDK, but in version 1.6 the polygon's initialization method wants an array ofCLLocation
objects.So I need to convert my
CGPoints
toCLLocation
objects orCLLocationCoordinate2D's
I found the following
StackOverflow
answer which allows you to do this usingMapKit
: http://stackoverflow.com/a/16230174/3344977But it seems kind of foolish to use
MapKit
and initialize anMKMapView
that no one will ever see just so I can utilize this one function, and now that I think about it there's no way to guarantee that theMKMapView
would be in sync with the realRMMapView
so this workaround would be unreliable anyways.I've been looking through the mapbox legacy API docs and can't seem to find a similar function, so I'm hoping that one exists and I've simply made a mistake.
Is there any way to convert a
CGPoint
to aCLLocation
orCLLocationCoordinate2D
using the mapbox legacy iOS SDK?Thanks.