How to convert latitude longitude into CLLocationCoordinate2D

Harsh picture Harsh · Jul 22, 2011 · Viewed 16.6k times · Source

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?

Answer

Joe picture Joe · Jul 22, 2011

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