Start a new topic

problem with Radar

problem with Radar


Thanks Christian . sure but just to say I've modified it alot and it may be confusing :) could you give an email address

forum@wikitude.com

Thanks Christian . I sent my ARchitecht file 

I get an error when I execute your function newData2 with your __data:

 

//debugging

                        if(i==1)

                        {

                            debugString = "name : " + jsonObject.id +

                                          "nlabelScale : " + labelScale +

                                          "\nimgScale : " + imgScale +

                                          "\nnameLength : " + nameLength;

                        }

                        else if(i==2)

                        {

                            debugString += "name : " + jsonObject.name +

                                           "\nlabelScale : " + labelScale +

                                           "\nimgScale : " + imgScale +

                                           "\nnameLength : " + nameLength;

                        }

 

document.getElementById("location").innerHTML = debugString;

 

The variable debugString=null:

 



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. 


 

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

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

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 . 

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 :(

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?
Login or Signup to post a comment