Reputation: 2822
i tried assigning values like this ,where coffeshop is an object with latitude a string variable,however value of coordinates are shown 0 values,while i nslog the coffeeshop.latitude and longitude i am getting correct values,is there any error in this conversion
CLLocationCoordinate2D coordinate;
coordinate.latitude=[coffeeshop.latitude doubleValue];
coordinate.longitude=[coffeeshop.latitude doubleValue];
Upvotes: 1
Views: 1428
Reputation: 6296
Hello
I sure it's a culture problem
you must check your string format
I got the same error cause my String contraint coma separator instead of point.
try to replace "," for "." (something like this) in the string
Upvotes: 1