The map control Mkmapview is often used in iOS development and can be used to get the latitude and longitude of pity Dorado when you click on a point in the Mkmapview as follows:
If a mkmapview is declared a Mymapview
1, add a gesture in the map, this gesture is a click action, when clicked will call Tappress this method
UITapGestureRecognizer *mtap = [[UITapGestureRecognizer alloc] initwithtarget:self action: @selector (tappress:)];
[Mymapview Addgesturerecognizer:mtap];
2, the next can be converted in the Tappress method
-(void) Tappress: (uigesturerecognizer*) Gesturerecognizer {
Cgpoint touchPoint = [Gesturerecognizer locationinview:mymapview];//here TouchPoint is the location of the clicked Point in the map control
Cllocationcoordinate2d touchmapcoordinate =
[Mymapview convertpoint:touchpoint tocoordinatefromview:mymapview];//here touchmapcoordinate is the latitude and longitude of this point
}
You can then add a PIN or whatever you want to do in that latitude and longitude.
Original: http://blog.csdn.net/volcan1987/article/details/6683652
(go) Click on a point in the map control Mkmapview in iOS to get the latitude and longitude of that point