我有与它的引脚一个MapView,并为CLLocation和getDistance的我之间的下面的代码,并在地图上的另一点:刷新我的MapView
- (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];
}
,但我如何可以实现刷新地图的方法当我选择一个按钮? ,当我想要的时候,我总能得到我身边的针脚。 该按钮不是问题,只有刷新!
我希望有人能帮助我?
问候 马尔科
没有人有答案吗? – Marco 2010-03-10 12:28:31