Start a new topic

Problems rendering pois in the production app

Problems rendering pois in the production app

Hi guys,

we have developed a titanium app but, unfortunately, we got some problems with the html drawables. Thus, when we test the app in the ARchitect Viewer (sdk 2.x) , the pois are rendered properly (with rounded corners and with the images separated according to the margins). For instance:


but, on the other hand, when we try the app (integrated with the titanium project + wikitude 3.x) the poi' width is cut:

Any idea? We need your help in order to be able to publish the final version of the app...


Maybe is a problem with the html code, so the declarations are attached below:


var styles = '.element {width: 320px;background:#EC6700;background:-webkit-gradient(linear, 0% 0%, 0% 100%, from(#EC6700), to(#F39900));background:-moz-linear-gradient(left top,left bottom,from(#EC6700),to(#F39900)); border-radius:8px;padding:10px;overflow: hidden;} #photo {float: right; padding: 5px; back; background: white} .distancia {font-size: 12px; color: white; padding: 5px; } h1 {display:block;font-family: Helvetica; color:white;font-size: 12px;font-weight: bold;padding: 5px;}';


var temp = new AR.GeoObject(myGeoLocation, {onClick : function(){

//function call

 }, drawables: {cam: new AR.HtmlDrawable({html:'<html><head><meta name="viewport" content="target-densitydpi=device-dpi, width = 320, user-scalable = 0"><style>'+styles+'</style></head><body><div class="element">'+photo+'<h1>'+objetos+'</h1><div class="distancia">'+distancia+'m.</div></div></body></html>'},8, {

 viewportWidth: 320,



 opacity : 1,

 updateRate : AR.HtmlDrawable.UPDATE_RATE.STATIC,  

}) }} );



Thanks in advance.

Best Regards

Hi There!

It seems to me your problem is related to the fact that you are porting your app from sdk 2.x to version 3.1 or later..

In SDK version 3.1 we made some internal changes to the visualization of html drawables which also included some minor changes in the javascript API concerning the definition of Htmldrawables. In your case it means that you also have to define a viewportHeight which represents the height of your webview (Please refer to the documentation for additional information). 

PS: in this release you also dont need to define the updateRate property. Please let me know if that helped.


Login or Signup to post a comment