Iphone 将注释(接点)放置到当前位置

Iphone 将注释(接点)放置到当前位置,iphone,objective-c,sqlite,mkmapview,Iphone,Objective C,Sqlite,Mkmapview,我正试图删除当前位置上的批注,但未删除该批注。如何才能在当前位置上删除注释并将该位置存储在SQLite中。用于在当前位置上放置批注。我试了两天,但没有成功 有人有任何想法、链接或提示来解决这个问题吗?尝试使用以下代码:- - (MKAnnotationView *) mapView:(MKMapView *)mapView viewForAnnotation:(id <MKAnnotation>) annotation{ if (annotation == mapView.

我正试图删除当前位置上的批注,但未删除该批注。如何才能在当前位置上删除注释并将该位置存储在SQLite中。用于在当前位置上放置批注。我试了两天,但没有成功

有人有任何想法、链接或提示来解决这个问题吗?

尝试使用以下代码:-

- (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];



    }
}
-(MKAnnotationView*)地图视图:(MKMapView*)地图视图注释:(id)注释{
if(注释==mapView.userLocation)
{
MKPinAnnotationView*annView=[[MKPinAnnotationView alloc]initWithAnnotation:annotation重用标识符:nil];
annView.pinColor=MKPinAnnotationColorRed;
annView.animatesDrop=TRUE;
annView.canShowCallout=是;
annView.calloutOffset=CGPointMake(-5,5);
返回视图;
[视图发布];
}
}

我想知道如何将注释放到当前位置并将该位置存储到sqlite中database@Ajay这是注释放置的代码,您可以从mapView.userLocation.location.coordinate.latitude和mapView.userLocation.location.coordinate.经度获取纬度和经度,然后将它们存储在sqlite中数据库。我需要存储放置my批注的位置。要将该位置存储到sqlite中吗database@Joinathanleffler我怎么办?你知道吗