Start a new topic

text on IR

text on IR


Hi Vincenzo,

Please try using targetSDK="13" in your Android Manifest.
if even this does not work on your device, please stay tuned for next SDK update and use Labels and ImageDrawables instead.

Kind regards,
Andreas

 

if you use var = new htmlDrawable AR.HtmlDrawable ({html: "My <div> div </ div>"} I display the div, but if I use the approach uri not.

 

I kindly ask for help!

 

thanks for the help but unfortunately I can not make it work.

ar.circle works, ar.HtmlDrawable no.

 

add a screenshot http://s15.postimg.org/o55eima2z/eccolo.png

 

this is the source:

 


function createTracker(){

var image = new AR.ImageResource("overlay.png", {onError: error});

overlay = new AR.ImageDrawable(image, 1.0, {zOrder: 0});

var htmlDrawable = new AR.HtmlDrawable({uri:"test.html"}, 4, {viewportWidth: 512, scale:1, updateRate:AR.HtmlDrawable.UPDATE_RATE.STATIC});

 

 

// create tracker 

trackerDataSetPath_1 = "Loghi.zip";

logoTracker_1 = new AR.Tracker(trackerDataSetPath_1, { onLoaded : trackerLoaded, onError: error });

 

// relative position from teh arrows

arrowXOffset = 2.0;

arrowYOffset = 0.1;

 

var arrow1 = arrowWithDirectionality(-arrowXOffset, -arrowYOffset, -45);

var arrow2 = arrowWithDirectionality(-arrowXOffset, arrowYOffset, 45);

var arrow3 = arrowWithDirectionality(-arrowXOffset, -arrowYOffset, 135);

var arrow4 = arrowWithDirectionality(-arrowXOffset, arrowYOffset, 225);

 

trackable2DObject = new AR.Trackable2DObject(logoTracker_1, "WikitudeLoga", { drawables: { cam: }});

trackable2DObject = new AR.Trackable2DObject(logoTracker_1, "WikitudeLogo", { drawables: { cam: }});

 

 

// we need to pack the arrow animations into a parallel animation group to play them synchronisly

masterAnimationGroup = new AR.AnimationGroup(AR.CONST.ANIMATION_GROUP_TYPE.PARALLEL, );

}

 

test.html is in .../assets/world/SimpleImageRecognition and .../assets/www/

i use a android 2.x and 3.x

 

 

I'm going crazy!!!!

 

 

make sure test.html is accessible relativly to your architect world. It helps to set a solid body background color within the html to see if the html drawable is infact overlaid. If you can see the background color this means there is a layout problem with the html content.

Addtionally replace the call to new AR.HtmlDrawable with a call to new AR.Circle to quickly test if the html drawable is infact the problem.

If this does not help, please state the platform (android, ios), sdk version and device you are using.

Hi,

I just tried to use the work as well as you suggested:

 

function createTracker(){

var image = new AR.ImageResource("overlay.png", {onError: error});

overlay = new AR.ImageDrawable(image, 1.0, {zOrder: 0});

var poiHTMLdrawable = new AR.HtmlDrawable({uri:"test.html"}, 4, {viewportWidth: 512, scale:1, updateRate:AR.HtmlDrawable.UPDATE_RATE.STATIC});

...


trackable2DObject = new AR.Trackable2DObject(logoTracker_1, "WikitudeLoga", { drawables: { cam: }});

trackable2DObject = new AR.Trackable2DObject(logoTracker_1, "WikitudeLogo", { drawables: { cam: }});

 

 

is correct ?

 


if you launch the application does not appear test.html

 


AR.Label is best suited for shorter single line text. If you need more control you can use the AR.HtmlDrawable that allows you to load and display any static HTML. For layouting the content have a look at this knowledgebase entry: http://forum.wikitude.com/documentation?p_p_id=2_WAR_knowledgebaseportlet&p_p_lifecycle=0&p_p_state=normal&p_p_mode=view&p_p_col_id=column-2&p_p_col_count=1&_2_WAR_knowledgebaseportlet_mvcPath=%2Fdisplay%2Fview_article.jsp&_2_WAR_knowledgebaseportlet_resourcePrimKey=35564

 

I answer by myself. It 's easy through the use of AR.Label

 

But I do not have text handling. If the string is long I can not see it. How would you handle the text in this case?

 

 

hi,

I just start to use the library Wikitude.

 

I had a doubt:

how can I overlay text on a tracker? or text that has content or http link?

 

I hope your in a friendly response

 
Login or Signup to post a comment