Ho il seguente ciclo nel mio viewDidLoad:CLLocationCoordinate2D a 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];
}
coord è CLLocationCoordinate2D
ma come posso usare Coord nel metodo seguito, perché ho bisogno di questo per ottenere la distanza tra due coordinate :
- (void)locationManager:(CLLocationManager *)manager
didUpdateToLocation:(CLLocation *)newLocation
fromLocation:(CLLocation *)oldLocation{
}
per favore aiutami sono bloccato!
Grazie a tutti per l'aiuto in anticipo
'coord' non è un' CLLocationCoordinate2D', 'coord' è un oggetto creato da te, un'istanza di' Koordinate'. –