Start a new topic

blurry AR.HtmlDrawable object on iphone

blurry AR.HtmlDrawable object on iphone




I am trying to show on the screen some HtmlDrawable objects.

I can actually see on teh screen... but they are quite blurry.

I am coding in XCode 4.5 (native , no phonegap) and testing on a iPhone 4s.

what am I doing wrong?

thank you in advance




<meta name="viewport" content="target-densitydpi=device-dpi, width = 512, user-scalable = 0" />




htmlPOI= "<div style='font-size:11px;color:#fff;width:140;height:45;display:block;padding:6px;background:#1C1C1C;'><img style='float:left;margin-right:6px;' src='" + + ".png'/><strong>" + 

jsonObject.title + "</strong><br/><label style='font-size:9px;'>(" + jsonObject.dist + " Km)</label></div>";


POI = new AR.HtmlDrawable({html:htmlPOI}, 2,

                                              {viewportWidth: 140, scale: 3, opacity: 0.75, clickThroughEnabled : true, allowDocumentLocationChanges:false, onClick:createClickTrigger(, updateRate:AR.HtmlDrawable.UPDATE_RATE.STATIC}


I guess your problem is the value you set for the viewport width. this value determinates how wide the actual image will be rendered before its displayed on the screen. You need to find the right ratio between your htmlDrawable height and the viewport width to get the best rendering result. In your case I would try to increase the viewport width of your htmlDrawable (400 insted of 140).

Best regards

Login or Signup to post a comment