iphone - Augmented reality with wikitude sdk -
i developing augmented reality app using wikitude sdk. quiet new sdk. have implemented per sdk documentation guidelines. can't able plot poi points in ar-browser view. generating poi points used following codes.
- (nsmutablearray *)generatepois:(nsuinteger)numberofpois { nslog(@"%s",__pretty_function__); nsmutablearray *poiarray = [nsmutablearray arraywithcapacity:numberofpois]; (nsuinteger = 0; < numberofpois; ++i) { objglobaldatas=[arrayitems objectatindex:i]; wtpoi *poi = [[wtpoi alloc] init]; nsstring *strid=objglobaldatas.arid; nsinteger poiid=[strid integervalue]; poi.id = poiid; poi.name = objglobaldatas.name; nslog(@"poi name =%@",objglobaldatas.name); poi.detaileddescription = objglobaldatas.poi_description; // poi.type = i%3; // set type 0->2->0->2... poi.type=1; nsstring *strlat=objglobaldatas.latitude; nsstring *strlng=objglobaldatas.longitude; float lan=[strlat doublevalue]; float lng=[strlng doublevalue]; poi.latitude = lan ;//+ wt_random(-0.01, 0.01); // set latitude around current location poi.longitude = lng;// + wt_random(-0.01, 0.01); poi.altitude = your_current_altitude + wt_random(0, 200); // altitude offset poi.poiimg=objglobaldatas.poi_indicator_image; poi.weburl=objglobaldatas.website; poi.distance=objglobaldatas.distance; [poiarray addobject:poi]; [poi release]; } nslog(@"check =%@",poiarray); return poiarray; }
i called function after fetching data of poi points parsing json link. in poiarray getting 3 objects around current latitude , longitude.but not showing in ar-browser view.
is code related wikitude sdk api? if so, you're missing [architectview calljavascript:@"*jsonstring*"]
call. call load places, defined in json string, loaded in ar. have closer @ simplearbrowser sample. demonstrates necessary steps load places in ar.
Comments
Post a Comment