Start a new topic

I changed wtc file, but.......

I changed wtc file, but.......

Hi everyone, I changed wtc file and image. But it did not recognize new image.

code is below.......please help me.......Target name is "abcd" and Target collection is I want to show the image-"imageOne.png"

what is the problem.....???

var World = {

loaded: false,


init: function initFn() {

/* Disable all sensors in "IR-only" Worlds to save performance. If the property is set to true, any geo-related components (such as GeoObjects and ActionRanges) are active. If the property is set to false, any geo-related components will not be visible on the screen, and triggers will not fire.*/ = false;




createOverlays: function createOverlaysFn() {

// Initialize Tracker

// Important: If you replace the tracker file with your own, make sure to change the target name accordingly.

// e.g. replace "pageOne" used for creating the AR.Trackeable2DOBject below, with the name of one of your new target images.

this.tracker = new AR.ClientTracker("assets/", {

onLoaded: this.worldLoaded



// Create overlay for page one

var imgOne = new AR.ImageResource("assets/imageOne.png");

var overlayOne = new AR.ImageDrawable(imgOne, 1, {

offsetX: -0.15,

offsetY: 0


var pageOne = new AR.Trackable2DObject(this.tracker, "abcd", {

drawables: {

cam: overlayOne





worldLoaded: function worldLoadedFn() {

var cssDivLeft = " style='display: table-cell;vertical-align: middle; text-align: right; width: 50%; padding-right: 15px;'";

var cssDivRight = " style='display: table-cell;vertical-align: middle; text-align: left;'";

document.getElementById('loadingMessage').innerHTML =

"<div" + cssDivLeft + ">Scan Target &#35;1 (abc):</div>" +

"<div" + cssDivRight + "><img src='assets/abcd.png'></img></div>";


// Remove Scan target message after 10 sec.

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








Did you check which of the triggers (onLoaded or onError) of the ClientTracker fire, to verify that the Tracker loads successfully.

Did you also verify that the onEnterFieldOfVision of the Trackable2DObject is fired (in which case the trackable was recognized, but the Drawables were not shown)?




actually I am beginner, so I cannot understand exactly....


So please let me know how to check the triggers (onLoaded or onError) of the ClientTracker fire.



For beginners, we have a whole lot of information available on our website. I suggest you work through the examples we have on our website. They introduce you to various topics of the API, including dealing with triggers (onClick for example).




I have already worked through the example(Image on target).


I want to change the tracker to mine, so I added image using wikitude tools and made the .wtc file and then change the code. But it doesn't work..
Login or Signup to post a comment