Start a new topic

render drawable (iOS javascript)

Hi at all, I'm new on wikitude and I have a little problem using cloudtracker, I've imported the sdk, I created a viewcontroller with architectView, I load different ARchitectExample and all work fine, the problem is when I try to show my collections...

With studio I create a collection (less then 1000), I set client token and colelction id on my ".js" file:


var World = {
	tracker: null,
	init: function initFn() {
		this.createTracker();
		this.createOverlays();
	},
	createTracker: function createTrackerFn() {
		World.tracker = new AR.CloudTracker("3f280b05e58212709523be03ee909f19", "565843eeaba250e80d17f0ed", {
			onLoaded: this.trackerLoaded,
			onError: this.trackerError
		});
	},

	startContinuousRecognition: function startContinuousRecognitionFn(interval) {
		this.tracker.startContinuousRecognition(interval, this.onRecognition, this.onRecognitionError, this.onInterruption);
	},

    
	trackerError: function trackerErrorFn(errorMessage) {
		alert(errorMessage);
	},
    
	createOverlays: function createOverlaysFn() {
       
	},

	onRecognition: function onRecognitionFn(recognized, response) {
        if (recognized){}
	},
	onRecognitionError: function onRecognitionErrorFn(errorCode, errorMessage) {
		alert("error code: " + errorCode + " error message: " + JSON.stringify(errorMessage));
	},
	onInterruption: function onInterruptionFn(suggestedInterval) {
		World.tracker.stopContinuousRecognition();
		World.tracker.startContinuousRecognition(suggestedInterval);
	},

	trackerLoaded: function trackerLoadedFn() {
		World.startContinuousRecognition(750);
		World.showUserInstructions();
	},

	showUserInstructions: function showUserInstructionsFn() {
		var cssDivLeft = " style='display: table-cell;vertical-align: middle; text-align: right; width: 20%; padding-right: 15px;'";
		var cssDivRight = " style='display: table-cell;vertical-align: middle; text-align: center;'";
		var img = "style='margin-right:5px'";

		setTimeout(function() {
			var e = document.getElementById('messageBox');
			e.parentElement.removeChild(e);
		}, 10000);			
	}
};
World.init();

 

my probem is that when the image was recognised I don't see the augmented content...

I think the problem is that I don't to insert "new AR.Trackable2DObject" but using cloud image I don't have an asset folder with all the image, so I don't know how to create my object...where is the mistake?


1 person has this problem
1 Comment

 Hello Francesco,


What you are missing is defining the augmentation you wish to have so therefore, I would suggest that you do the following. Download our sample app and view our code regarding the sample 2.2 CloudRecognition ContinuousRecognitionVsOn-Click. See how we are working with Cloud Recognition there and try to follow this sample.


I hope this helps

Eva

Login or Signup to post a comment