Are you executing inyectLocations() correctly from the native part? Without this the arRadar.show() function won't be called. I quickly tried tested the code in the desktop browser using ade.js and it does not show any errors.
D
Daniel Fernández
said
about 10 years ago
Yes, actually everything works (POI and indicators) except the radar as I said in the beggining of the post. Also the radar images are not loading and I downloaded the lastest Wikitude SDK version.
W
Wolfgang Damm
said
about 10 years ago
Are you using the latest SDK? Version 3.2 enbaled the usage of html divs to define the radar position.
If you are using 3.2 please provide a complete sample including an example input for your inyectLocations function, so I can have a look at it.
D
Daniel Fernández
said
about 10 years ago
Hi, I'm trying to implement the radar but something is missing. With the code below everything works excepts the radar. Also the Ar.ImageResource onError/onLoad is not triggering :(
td.distance div {font-size:14px; color:#e2cf00; background-color:#000000; height:30px; margin-top:140px; line-height:30px;}
</style>
</head>
<body>
<script>
var colors = ;
var params = {};
if (location.search) {
var parts = location.search.substring(1).split('&');
for (var i = 0; i < parts.length; i++) {
var nv = parts.split('=');
if (!nv) continue;
params = unescape(nv);
//|| true;
}
}
var color = (colors != null ? colors : "#888888");
var html = "<div class='coupon' style='background:url("+params.image+") no-repeat;'><table><tbody><tr><td class='title' style='background-color:"+color+"'><div>"+params.title+"</div></td></tr><tr><td class='distance'><div>A "+params.distance+"</div></td></tr></tbody></table></div>";
document.write(html)
</script>
</body>
</html>
Thanks.
W
Wolfgang Damm
said
about 10 years ago
I quickly scanned over the code and do not see anything wrong with it. Could you please provide a zipped archive of the complete world including resources. Additionally you can test to see if there are any errors when loading the radar images by adding an onError trigger:
It actually works for me, the only thing is that your div where the radar should be positioned is not transparent. As we are drawing the radar in the background and not on top of the HTML content it is hidden. To fix this simply use "background: none" for the #radar css style.
D
Daniel Fernández
said
about 10 years ago
Agg, it wasn't working. Thanks for your support Wolfang!
Daniel Fernández