-(void) Clicklongpress: (Uilongpressgesturerecognizer *) longpress {
Cgpoint point = [longpress Locationinview:mapview];
Cllocationcoordinate2d coord = [Mapview convertpoint:point Tocoordinatefromview:mapview];
Cllocation *location = [[Cllocation alloc] InitWithLatitude:coord.latitude longitude:coord.longitude];
Mkpointannotation *annocation = [[Mkpointannotation alloc] init];
Annocation.coordinate = coord;
Annocation.title = @ "my anchor point";
[Mapview addannotation:annocation];
}
Proxy Method Signing agreement
Mkmapviewdelegate
-(Mkannotationview *) Mapview: (Mkmapview *) Mapview viewforannotation: (id<mkannotation>) annotation{
static NSString *annoid = @ "str";
Mkannotationview *annoview = [Mapview dequeuereusableannotationviewwithidentifier:annoid];
if (!annoview) {
Annoview = [[Mkannotationview alloc] initwithannotation:annotation reuseidentifier:annoid];
}
Annoview.image = [UIImage imagenamed:@ "1"];
return annoview;
}
Iosios map customizations and add anchor points