У меня есть следующий цикл в моей viewDidLoad:CLLocationCoordinate2D к CLLocation
for(int i=1; i<[eventsArray count]; i++) {
NSArray *componentsArray = [[eventsArray objectAtIndex:i] componentsSeparatedByString:@","];
if([componentsArray count] >=6) {
Koordinate *coord = [[Koordinate alloc] init];
coord.latitude = [[componentsArray objectAtIndex:0] floatValue];
coord.longtitude = [[componentsArray objectAtIndex:1] floatValue];
coord.magnitude = [[componentsArray objectAtIndex:2] floatValue];
coord.depth = [[componentsArray objectAtIndex:3] floatValue];
coord.title = [componentsArray objectAtIndex:4];
coord.strasse = [componentsArray objectAtIndex:5];
coord.herkunft = [componentsArray objectAtIndex:6];
coord.telefon = [componentsArray objectAtIndex:7];
coord.internet = [componentsArray objectAtIndex:8];
[eventPoints addObject:coord];
}
коорда является CLLocationCoordinate2D
но как я могу использовать коорд следующего способа, потому что мне нужно это, чтобы получить расстояние между двумя координатами :
- (void)locationManager:(CLLocationManager *)manager
didUpdateToLocation:(CLLocation *)newLocation
fromLocation:(CLLocation *)oldLocation{
}
, пожалуйста, помогите мне, я оказался на мель!
спасибо всем за помощь заранее
'' '' '' '' CLLocationCoordinate2D', 'coord' - это объект, который вы создали сами, экземпляр' Koordinate'. –