开发者

Dropping the annotation (Pin) on the current location

开发者 https://www.devze.com 2023-03-19 12:13 出处:网络
I am trying to drop an ann开发者_Go百科otation on the current location but it is not getting dropped. How can it be possible to drop the annotation on the current location and store that location in S

I am trying to drop an ann开发者_Go百科otation on the current location but it is not getting dropped. How can it be possible to drop the annotation on the current location and store that location in SQLite. For dropping annotation on the current location. I am trying this from two days but not getting any success.

Does anyone have any idea or link or hints to solve that?


try using this code:-

- (MKAnnotationView *) mapView:(MKMapView *)mapView viewForAnnotation:(id <MKAnnotation>) annotation{

    if (annotation == mapView.userLocation)
    {

        MKPinAnnotationView *annView=[[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:nil];
        annView.pinColor = MKPinAnnotationColorRed;
        annView.animatesDrop=TRUE;
        annView.canShowCallout = YES;
        annView.calloutOffset = CGPointMake(-5, 5);
        return annView;
        [annView release];



    }
}
0

精彩评论

暂无评论...
验证码 换一张
取 消