Question

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?

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top