我有與它的引腳一個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