Which dataType will return the value (37.961498) as it is?
I am working in MapView. Where, at present I am setting annotation and hence I have to set CLLocationCoor
When converting a string
to a double
you should be using doubleValue
instead of floatValue
double int1=[num1s doubleValue];
double int2=[num2s doubleValue];
NSLog(@" %f %f ",int1,int2);
annotation.coordinate=CLLocationCoordinate2DMake(int1, int2);
also not critical but I wouldn't recommend naming your doubles as int1 and int2 that is likely to cause you confusion at some point
annotation.coordinate=CLLocationCoordinate2DMake([nums doubleValue], [int2 doubleValue]);
Try this
double int1=[num1s floatValue];
double int2=[num2s floatValue];
NSLog(@" %0.7f %0.7f ",int1,int2);
annotation.coordinate=CLLocationCoordinate2DMake(int1, int2);
Read String Format Specifiers for more info.