I want to find where user tapped on MapKit. I cannot find a action to make a connection so i am wondering there is an alternate method for the same. please let me know.
Asked
Active
Viewed 550 times
2 Answers
1
As @Disco S2 says, add the instance of MKMapView as a subview to your view. To know where your user tapped on the map, use this method:
- (CGPoint)convertCoordinate:(CLLocationCoordinate2D)coordinate toPointToView:(UIView *)view
![](../../users/profiles/171406.webp)
Vaishnavi Naidu
- 2,615
- 2
- 23
- 26
-
After I get a sub view(map kit) to the parent view ... still getting a white screen.. – Bhagwan Dass Swami Jun 30 '11 at 10:09
-
After adding mapview to view, you are getting a white screen or is it happening after you tap on your map – Vaishnavi Naidu Jun 30 '11 at 11:25
0
Put the mapkit inside a view and listen for touches in that view. There is then a method to convert the touch in the mapView to a touch in the view and vice versa. I can't remember the method for converting but it will be in the map kit documentation
![](../../users/profiles/507313.webp)
StuStirling
- 14,067
- 20
- 82
- 138