我有一个带有大头针的 mapView,以及我与地图上其他点之间的 CLLocation 和 getDistance 的以下代码:
- (void)locationManager:(CLLocationManager *)manager
didUpdateToLocation:(CLLocation *)newLocation
fromLocation:(CLLocation *)oldLocation{
Koordinate *kunde = [[Koordinate alloc] init];
kundenPoints = [[NSMutableArray array] retain];
for(int i = 0; i<[eventPoints count]; i++){
kunde = [eventPoints objectAtIndex:i];
CLLocation *userLoc = [[CLLocation alloc] initWithLatitude:kunde.latitude longitude:kunde.longtitude];
double distance = [newLocation getDistanceFrom:userLoc] / 1000;
if(distance <= 100){
[kundenPoints addObject:kunde];
}else {
}
}
[mapView addAnnotations:kundenPoints];
}
但是当我点击按钮时如何实现刷新地图的方法?当我想要的时候,我总是把别针放在我身边。按钮不是问题,只有刷新!
我希望有人能帮助我??
最好的问候马可