Start a new topic

setCloudRecognitionServerRegion, not sure how to set

 createTracker: function createTrackerFn() {

    World.cloudRecognitionService = new AR.CloudRecognitionService("xxxx", "yyyy", { 

   onInitialized: this.trackerLoaded,

   onError: this.trackerError

  });

 

  World.tracker = new AR.ImageTracker(this.cloudRecognitionService, {

   onError: this.trackerError

  });

 },


If want to set using China server, then how and where do I set it?

setCloudRecognitionServerRegion


Hello Frederick,


As documented here, under "Regional Availabilty of Cloud Recognition", you need to make use of proper endpoint and settings both in the SDK, Manager API and Target Manager. It means that if you would like to use our China Region then you need to use the following:

  • SDK JS API: you can set the Region with AR.context.setCloudRecognitionServerRegion(REGION) where REGION is one between AR.CONST.CLOUD_RECOGNITION_SERVER_REGION.AMERICAS or .EUROPE or .CHINA. In the current example would be AR.CONST.CLOUD_RECOGNITION_SERVER_REGION.CHINA
  • SDK Native API: you can set the Region via TrackerManager::setCloudRecognitionServerRegion(REGION) where REGION is one between AR.CONST.CLOUD_RECOGNITION_SERVER_REGION.AMERICAS or .EUROPE or .CHINA. In the current example would be AR.CONST.CLOUD_RECOGNITION_SERVER_REGION.CHINA
  • Web Target Manager: access targetmanager-cn.wikitude.com
  • Manager API: api-cn.wikitude.com


Note: Regions do not share data (yet). Consequently targetcollections created in China are not available neither in Europe nor in Americas and viceversa.

For any further questions pls feel free to ask.

Have fun!
Eva

 

Do you mean something like this?

createTracker: function createTrackerFn() {
    AR.context.setCloudRecognitionServerRegion(2);

    World.cloudRecognitionService = new AR.CloudRecognitionService("xxxx", "yyyy", { 

   onInitialized: this.trackerLoaded,

   onError: this.trackerError

  });

Hello Frederick,

A good reference on how the setCloudRecognitionServerRegion() method is working would be this documentation. I have pasted an example for you here, which is similar with your code.

AR.context.setCloudRecognitionServerRegion(AR.CONST.CLOUD_RECOGNITION_SERVER_REGION.CHINA);
// AR.CONST.CLOUD_RECOGNITION_SERVER_REGION.CHINA = 2
// so you could just as well pass the variable 2, however it is recommended to pas the const instead

World.cloudRecognitionService = new AR.CloudRecognitionService(“<your clientToken>”, “<your tcId>”, { 
   onInitialized: this.trackerLoaded,
   onError: this.trackerError
});

 

 Have fun!

Eva

Login or Signup to post a comment