The map control mkmapview is often used in iOS development. You can use the following method to obtain the latitude and longitude of a modified point when you click a certain point in mkmapview:
If a mkmapview is declared as mymapview
1. Add a gesture to the map. This gesture is a click action. When you click it, The tappress method is called.
Uitapgesturerecognizer * mtap = [[uitapgesturerecognizer alloc] initwithtarget: Self action: @ selector (tappress :)];
[Mymapview addgesturerecognizer: mtap];
[Mtap release];
2. You can perform the conversion in the tappress method.
-(Void) tappress :( uigesturerecognizer *) gesturerecognizer {
Cgpoint touchpoint = [gesturerecognizer locationinview: mymapview]; // here, touchpoint is the position of a clicked point in the map control.
Cllocationcoordinate2d touchmapcoordinate =
[Mymapview convertpoint: touchpoint tocoordinatefromview: mymapview]; // touchmapcoordinate indicates the longitude and latitude of the point.
}
Then you can add a pin or do anything you want to do at the longitude and latitude.