How to get coordinate data of selected map pin?
I am trying get the coordinate of each pin I select on my map. I have an
issue that every pin I select it give me the same value.
In the subtitle I can see the value of each pin I select but when I equal
it to Lat and Lon string value it gives me always the same value so Lat
and Lon string value won't change. So please where could be my issue?
CLLocationCoordinate2D annotationCoord;
annotationPoint.subtitle = [NSString stringWithFormat:@"%f & %f",
annotationPoint.coordinate.latitude,
annotationPoint.coordinate.longitude];
Lat = annotationPoint.coordinate.latitude;
Lon = annotationPoint.coordinate.longitude;
NSLog(@"Lat is: %f and Lon is: %f", Lat, Lon);