Location in iPhone ARKit overlaps in one place

I am using ARKit for one of my augmented reality applications. But the problem I am facing is that the locations in the camera overlap with each other.

When I tried it using hardcoded data, I was able to show the data in different places. Now I retrieve the data from the server and display it on ARKit. This shows that all locations overlap with each other.

Here is my code:

for (NSDictionary *drop in drops)
{
    CLLocation *tempLocation = [[CLLocation alloc] initWithLatitude:[[[drop objectForKey:@"latitude"] objectForKey:@"text"] floatValue] longitude:[[[drop objectForKey:@"longitude"] objectForKey:@"text"] floatValue]];
    tempCoordinate = [ARGeoCoordinate coordinateWithLocation:tempLocation];
    tempCoordinate.inclination = M_PI/30;
    tempCoordinate.title = [[drop objectForKey:@"DropText"] objectForKey:@"text"];
    tempCoordinate.subtitle = [[drop objectForKey:@"DropPlace"] objectForKey:@"text"];
    tempCoordinate.type=[[[drop objectForKey:@"DropType"] objectForKey:@"text"] intValue];
    [tempLocationArray addObject:tempCoordinate];
    [tempLocation release];

}
[viewController addCoordinates:tempLocationArray];
[viewController startListening];

Shows all overlapping overlaps. I need a solution on how to fix this problem or what I am doing wrong here, showing places one after another. Please note that in my case all drops have different latitude and longitude. I tested this.

+5
1

, , . , .

+1

All Articles