Sie sind nicht angemeldet.

1

Donnerstag, 31. Januar 2013, 23:18

Set Compass Heading with JavaScript?

I'm using the compass plugin that doesn't require the compass.js, it simply uses XML

I want to be able to dynamically change the Heading. Ideally with a URL parameter but just via javascript would be okay too.
I tried making a JS function that returns a number for the heading but the compass just broke and never rotated.

Example:

Quellcode

1
2
3
<action name="onviewchange">
   sub(plugin[compass_pointer].rotate, view.hlookat, js("getHeading();"));
</action>


What am I missing here? Is there any way to use the %$Variable% markup on values other than URL paths?

Ähnliche Themen