Search code examples
core-locationlatitude-longitudecllocation

convert lat long to CLLocationCoordinate2D


how do i convert lat long to CLLocationCoordinate2D ??


Solution

  • You can initialize your CLLocation with a lat/long like so

    - (id)initWithLatitude:(CLLocationDegrees)latitude longitude:(CLLocationDegrees)longitude;
    

    You can then use the coordinate property to get the CLLocationCoordinate2D value.