Closed babyghost-ys closed 11 years ago
I tried to copy the ARView.h and ARView.m to my project from sample, but it said no data. How could I initiate the data? I have already got the coordinates, title and properties, like what I talked above.
Lat = [[[[[self rssParser]rssItems]objectAtIndex:i]lat] floatValue]; Lng = [[[[[self rssParser]rssItems]objectAtIndex:i]lng] floatValue]; // Creates a marker in the center of the map. GMSMarker *marker = [[GMSMarker alloc] init]; marker.position = CLLocationCoordinate2DMake(Lat, Lng); marker.title = [[[[self rssParser]rssItems]objectAtIndex:i]header]; marker.snippet = [[[[self rssParser]rssItems]objectAtIndex:i]desc];
Hi babyghost666,
I think the issue is that you give all the values of a single ARObject instead of an array of ARObject:
arData = [[_arObject getARObjectData] allValues];
[arController startARWithData:arData];
While arData should have an array of dictionaries of ARObjects... does that make sense? So:
arData = [NSArray arrayWithObject:_arObject getARObjectData]];
[arController startARWithData:arData];
Make sure you refer to the Wiki guide: ARData and data structures
Hi glesage,
Thanks for answering. Nice people over StackOverflow has already helped me to solve the problem. Thanks anyway.
Alright cool could you link up the URL of the answer on stackoverflow here (so others can see it too) Thanks! (:
Here you go,
Thanks for the great cocoa control, by the way!
Please I have the same problem regarding setting up the praugmentedreality framework. I just have the radar on camera view. how do you make it work ?
Hi,
I am trying to write an app with AR support. And I am so happy to find a simple library like this.
Sadly, I couldn't understand how to setup the ARdata. What would be the type of ARdata?
Here is how I setup the library to my existing project
Define the ARdata and ARobject like below,
ARObject _arObject; NSArray arData;
Add the data to the AR object after loading the XML from the internet (i is the index added to the for loop),
Lat = [[[[[self rssParser]rssItems]objectAtIndex:i]lat] floatValue]; Lng = [[[[[self rssParser]rssItems]objectAtIndex:i]lng] floatValue]; // Creates a marker in the center of the map. GMSMarker *marker = [[GMSMarker alloc] init]; marker.position = CLLocationCoordinate2DMake(Lat, Lng); marker.title = [[[[self rssParser]rssItems]objectAtIndex:i]header]; marker.snippet = [[[[self rssParser]rssItems]objectAtIndex:i]desc];
[_arObject initWithId:i title:marker.title address:marker.snippet coordinates:coordinates andCurrentLocation:coordinates]; arData = [[_arObject getARObjectData] allValues]; [arController startARWithData:arData];
Could you please guide me how to present the AR view controller by pressing a button in the Main View controller? Thanks.