TypeError: Cannot set property 'innerHTML' of null
arguments: Array
0: "innerHTML"
1: null
Please debug your js in a browser with the ade like you execute it in your app. Then you see very well if you get any errors in the JavaScript part. You can also do some logging with the AR.logger
An error in your JS could be a reason for your issue.
m
m0j1 42420
said
about 11 years ago
hi , I tried to add the radar as it is told in it's tutorial . but as soon as I add a line about radar like :
AR.radar.background = new AR.ImageResource("radarcircle.png");
my ARchitecht world stops working and statusElement says 'loading JSON objects' .
it's strange and since I had these basic problems with animations I now doubt about my version of Wikitude . from the name of the folder I've downloaded it says 1.1 but is there any way I can check my version inside the code ?
thanks
C
Christian Ebner
said
about 11 years ago
Hi,
if you are using the sdk open the readme.txt and have a look at the release notes. There you'll see the latest version number. Additionally you can get the version number by calling the function architectView.getVersionNumber().
If you are using the Wikitude-App to test your world just update your app to the latest Wikitude-Version.
Hope it helps. If it doesn't help plz send more info (code, device/OS, if you are using the sdk/the wikitude-app to test your world),
Chris
m
m0j1 42420
said
about 11 years ago
Thanks Christian , from the readme.txt it says my ARchitect version is 1.1 . but there is no other explanation why my animation groups and radar doesn't work! as soon as I add a line of code about animation groups or radar , my ARchitect stops working .
m
m0j1 42420
said
about 11 years ago
this is the code I've used , the code in the script tag inside head tag :
<script>
var radar = AR.radar;
radar.background = new AR.ImageResource("radarcircle.png");
radar.positionX = 0.1;
radar.positionY = 0.1;
radar.width = 0.4;
radar.centerX = 0.5;
radar.centerY = 0.5;
radar.radius = 0.4;
radar.onClick = function(){AR.logger.info('radar was clicked');};
radar.enabled = true;
</script>
and I defined this variable inside newData function :
var radarCircle = new AR.Circle(0.05,{style:{fillColor:'#83ff7b'}});
and I modified the definition of POI object inside newData like this :
jsonObject.poiObj = new AR.GeoObject(geoLoc, {drawables: {cam: poidrawables , radar:radarCircle}});
now it loads POI objects but there's no sign of radar :(
C
Christian Ebner
said
about 11 years ago
Do I understand that right that you dont see the background-image of the radar (radarcircle.png) and you also don't see the radarCircle on top of it?
The code-snippet you sent looks correct. Could you send your complete source code?
m0j1 42420