У меня есть 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];
}
но как я могу реализовать метод, который обновляет карту, когда я вкладываю на кнопку?
что я всегда получаю булавки вокруг меня, когда хочу.
кнопка не проблема, только обновление!
Я надеюсь, что кто-то может мне помочь ??
С наилучшими пожеланиями
Marco