MKMapview place pin at location (long/lat)

3sl picture 3sl · Sep 18, 2011 · Viewed 35.3k times · Source

I have latitude and long values and I need to be able to drop a pin at this location.

Can anybody provide some advice on how to go about this?

Answer

Jhaliya picture Jhaliya · Sep 18, 2011

Find the below very simple solution to drop the pin at given location define by CLLocationCoordinate2D

Drop Pin on MKMapView

Edited:

CLLocationCoordinate2D  ctrpoint;
ctrpoint.latitude = 53.58448;
ctrpoint.longitude =-8.93772;
AddressAnnotation *addAnnotation = [[AddressAnnotation alloc] initWithCoordinate:ctrpoint]; 
[mapview addAnnotation:addAnnotation];
[addAnnotation release];