i want to give option to user to put the location name what he want to search in google map from iphone. when user put the location name that particular map should come.
for now i am doing this by fixing the value of the of coordiante in its object latitude and longitude.
CLLocationCoordinate2D location=mapView.userLocation.coordinate;
location.latitude=19.14;
location.longitude=73.10;
is there any way to give the value of this coordinate in text and convert this to the value of CLLocationCoordinate2D ?
Best Answer
I am not entirely clear on your question, but if you are wanting to convert an NSString into a CLLocationCoordinate2D you can use the following:
This code doesn't check the validity of the string, which you could do be checking the NSArray you get back from componentsSeparatedByString.