I want to display more than one annotation on the map at the same time. the problem that I have is that I have all latitude and longitude as NSString...
I want to convert strings to duble so that I can passed to "CLLocationCoordinate2D" instance.. but I get error which says:Pointer cannot be cast to type 'double'
locationCoordinate.latitude=(double)NearbyLocations.lat;
locationCoordinate.latitude=(double)NearbyLocations.lng;
This is a part of the code that I have problem with. However, as you might see that I haven't finished it yet.
NSMutableArray *locations= [[NSMutableArray alloc]init];
CLLocationCoordinate2D locationCoordinate;
location *NearbyLocations;
Annotation *annotatedLocations;
//for (int i=0; i < locationOnMap.count;i++) {
annotatedLocations = [[Annotation alloc]init];
locationCoordinate.latitude=(double)NearbyLocations.lat;
locationCoordinate.latitude=(double)NearbyLocations.lng;
annotatedLocations.coordinate=locationCoordinate;
annotatedLocations.title=NearbyLocations.lo_name;
annotatedLocations.subtitle=NearbyLocations.lo_vicinity;
[locations addObject:annotatedLocations];
//}
What can I do to cast point typed string into double