Start a new topic

radar scaling with ARchitect

radar scaling with ARchitect


Hello,

 

I did the tutorial to learn a little bit about this kind of developing. But when I change the number of the slider from the Tutorial "Limiting Visible POIs (3/4)" my radar is still the same. And all my POIs are still visible.I do not know what is the minimum distance, but the POIs are around 500m away. Is it to short?

 

I hope somebody could help me.

Thanks

Hi,

can you elaborate on what number you changed and if you did any modifications to the existing example? Including code might also help to clarify the changes.

Hi,

I changed the slider from the value "50" to "1" and any value between, but nothing happened. If the following code says, that the minimum is 1km and the maximum is 50km, then I see my problem.

onSliderChanged: function onSliderChangedFn(value) {

if (value > 0) {

var valueMeters = value * 1000;

PoiRadar.setMaxDistance(valueMeters);

AR.context.scene.cullingDistance = valueMeters; }}

But I deleted the "1000",too. And nothing happened. I still saw my POIs on the radar and on the display.

 

Did I missed some code? I only did what stands on the page.

I don't see anything wrong with the code you postet. It seems to be straight from the original example. Did you make any changes to the example before testing it? It should be working out of the box.

If it does not, please let me know what device (inlcuding OS version) you are using and at which location you are at.

If you made additional changes please verify (e.g. using an alert) that the onSliderChanged function is still called.

Thanks.

I did not change anything, I only tried to combine the radar with the slider. In the attachments you can see all my javascript-files except my POIs.

I extended the onSliderChanged function with an alert, but nothing happened. So I think that I forgot an link between all the files, but I do not know where.

 

I use an Android 4.1.2 device and my location is Leipzig, Germany.

Hi,

I found the problem: slider.js has a runtime error and won't execute the slider code properly.

In order to catch errors like these we offer the ade.js that comes with the SDK. It allows to run/test/debug your web code inside a desktop browser. Just include it in the page and it will make the architect api available on the desktop. There is even the possibility to look at created objects including their properties and executing triggers (e.g. onClick).

just remove the line:

document.getElementById("statusElement").innerHTML = 'loading slider....';

at the beginning of your slider.js script. or fix it accordingly. 

 

 

ahhh....now it's working.

Thank you very much
Login or Signup to post a comment