I want to design a dynamic pin annotation on Google map in iPhone such that user can drag the pin by taping on it and place this pin on Google maps to set the location of its choice.
After user puts the pin I want to get the location coordinates and location name corresponding to that pin.
Any suggestion how to develop this in iPhone.
Thanks
I want to design a dynamic pin annotation on Google map in iPhone such
Share
In your view controller you have to implement methods from MKMapViewDelegate protocol and LongPressGestureAware (which I created) for dropping the pin on the map when the user taps and hold on the screen.
Your annotation should implement MKAnnotation and MKReverseGeocoderDelegate protocols.
I paste some of my code which can help you:
SimpleMapAnnotationViewController.h:
SimpleMapAnnotationViewController.m :
SimpleMapAnnotation.h
SimpleMapAnnotation.m