no sorry the similar question doesn't help i have readed this about 4 times.
yes i have the distance method but to get the distance i need the coordinates of userLocation, look this is my code:
- (void)locationManager:(CLLocationManager *)manager
didUpdateToLocation:(CLLocation *)newLocation
fromLocation:(CLLocation *)oldLocation{
Koordinate *testUser = [eventPoints objectAtIndex:1];
CLLocation *testUserLoc = [[CLLocation alloc] initWithLatitude:testUser.latitude longitude:testUser.longtitude];
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 = [testUserLoc getDistanceFrom:userLoc] / 1000;
if(distance <= 100){
[kundenPoints addObject:kunde];
}else {
}
}
[mapView addAnnotations:kundenPoints];
}
actual it is testUser but excpect testUser i need my userLocation????
I hope you could help me again?