Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert string to CLLocationCoordinate2D

I have an array with NSString's in it. Some of these are latitude and longitudes and I need to use this with the below code.

The latText and lonText are my strings that I am trying to use as co-ordinates....

   CLLocationCoordinate2D pinlocation=mapView.userLocation.coordinate;

    pinlocation.latitude = latText;

    pinlocation.longitude  =lonText;
like image 598
Lee Armstrong Avatar asked May 09 '09 08:05

Lee Armstrong


1 Answers

pinlocation.latitude = [latText doubleValue];
like image 89
Jane Sales Avatar answered Sep 30 '22 15:09

Jane Sales