views:

206

answers:

1

Hello,

I'm currently using the ARKit ported by the http://iphonear.org guys, looping through a fetched xml and plotting coordinates on the screen. However for some reason casting the object values:

for(NSObject *locxml in xmlLocations) {
    tempLocation = [[CLLocation alloc] 
                    initWithLatitude:   (int)[locxml valueForKey:@"lat"]
                    longitude:          (int)[locxml valueForKey:@"long"]];


    tempCoordinate = [ARGeoCoordinate coordinateWithLocation:tempLocation];
    tempCoordinate.title = [locxml valueForKey:@"title"];
    [tempLocationArray addObject:tempCoordinate];
    [tempLocation release];
    [locxml release];
}

just doesn't show up anything, i have already tried

[[locxml valueForKey:@"lat"] doubleValue] which does indeed shows coordinates just totally in the wrong place (yeah i'm sure of this).

Any help on how to put coordinates from an object into a CLLocation?

A: 

nvm for some reason the lat and longitude got swapped >.< i feel stupid now.

M0rph3v5
mark your question as accepted so everyone will be aware that your problem is solved
Vladimir