Change coordinate of MKOverlay for an MKOverlayView

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-03 13:42:52

same problem is occurred here , so i'm creating set of method and calling it according to requirement.

-(void)removeAllAnnotationFromMapView{
    if ([[self.tmpMapView annotations] count]) {
        [self.tmpMapView removeAnnotations:[self.tmpMapView annotations]];
    }
}
-(void)removeAllOverlays{
    if ([[self.tmpMapView overlays] count]) {
        [self.tmpMapView removeOverlays:[self.tmpMapView overlays]];
    }
}

-(void)removeOverlayWithTag:(int)tagValue{
    for (MKOverlayView *oView in [self.tmpMapView overlays]) {
        if (oView.tag == tagValue) {
            [self.tmpMapView removeOverlay:oView];
        }
    }
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!