Start a new topic

Load local WTC file.

Load local WTC file.


We would like to load the WTC local but running the World Javascript file from remote server.

The world Javascript file is hosting on a remote server.
e.g. <script src="http://www.remoteserver.com/world/js/main.php"></script>

We can't load the local WTC file as following.

// Initialize Tracker
this.tracker = new AR.Tracker('www/world/wtc/xxxxx.wtc', {
onLoaded: this.worldLoaded
});

 

Can we do that? Thanks.

Actually, we would like to download the latest WTC first when startingup the application.

But, the world javascript file will be hosting on a remote server.

How can we load the WTC file locally with a remote JS file for World.

Thanks.

 

Hi!
You should be able to load a .wtc file from the application bundle although the .js file (script) is not. I did a quick test with the native SDK and it's working very well. After that I rebuild the same setup in a PhoneGap application and so far I get a tracker failed to load log in the Xcode console. Can you verify that the same output is also logged in your Xcode console? 
I will continue to have a look at this problem and will post any findings in this thread.

Wikitude SDK: Tracker: failed to load ()

 

Best regards

Andreas

Hi,

I am working on Android, not iOS, but I don't find any error loading message in the debug console; However, the WTC file not downloaded as "onLoaded" not fired.

Thanks.

Frederick

Hi Frederick,
We both made a simple mistake that lead to the load error. 
You have to pass the tracker path as a relative path to the ARchitect World. The ARchitect World is located in 'www/world/', so the tracker path has to be 'wtc/XXX.wtc'.

Hope this fixes the problem for you as well.

Best regards

Andreas

I got what you mean.

Thanks.

It works now.
Login or Signup to post a comment