objective-ciphonecllocationcoordinate2d

How to convert latitude longitude into CLLocationCoordinate2D


I want to convert lat lon to CLLocationCoordinate2D.

self.currentLocation = {.latitude = 0.0, .longitude = 0.0};

This gives me error "Expected expression".

What am I doing wrong?


Solution

  • Use CLLocationCoordinate2DMake(CLLocationDegrees latitude, CLLocationDegrees longitude) to create the coordinates.