Trying to understand API

Q&A about the latest versions
Post Reply
panocanarias
Posts: 28
Joined: Sat Sep 09, 2006 7:28 pm

I'm trying to understand and use the JavaScript-API .
What I want to do is: loading a new pano by clicking on a link (text or image).
I had a look at the documentation (http://tinyurl.com/3xrqd56) and the linked example.
Unfortunately the example does not demonstrate a "openNext" action.
Documentation says:

Code: Select all

pano.openNext(<url:String>,<parameter:String>); // Open next panorama
I'm trying this:

Code: Select all

<a onClick="pano.openNext(pano5_out.swf);" href="#">Load Pano 5</a>
But nothing happens.
A pano.moveTo(....) link works like expected.
I uploaded a simple testpage (http://tinyurl.com/35z9lj5) so one can check the sourcecode (will remove it in a few days).
What am I doing wrong?
What does <parameter:String> mean? Which parameters can/should I use here?
Somebody please could give me a hint or advice? Any example to view?

Thanks, Klaus
panocanarias
Posts: 28
Joined: Sat Sep 09, 2006 7:28 pm

Update

Well, I think after a lot of trial 'n error I got finally it.
It seems, it's a question of syntax.
You have to wrap the <Url:String> in single quotes (= ' xxx.swf '). Documentation is a bit unclear here.
Should look like this example:

Code: Select all

<a onClick="pano.openNext('pano5_out.swf');" href="#">Load Pano 5</a>
But still I do not know what <parameter:String> means or is good for. Thomas ?

I updated my testpage (http://tinyurl.com/35z9lj5). Should work now.
( Comments appreciated )

Salu2, Klaus
User avatar
thomas
Chief Gnome
Posts: 2611
Joined: Fri Sep 01, 2006 3:56 pm
Location: Vienna, Austria
Contact:

panocanarias wrote:But still I do not know what <parameter:String> means or is good for. Thomas ?
The parameters are same as the "target" field in the GUI so you can change the starting position of your next panorama.
MfG, Thomas
User avatar
360Texas
Moderator
Posts: 3684
Joined: Sat Sep 09, 2006 6:06 pm
Location: Fort Worth, Texas USA
Contact:

I clicked your tiny URL... got a white page.. lower left corner says "Done".

I am using IE 8
Dave
Pano2VR Forum Global Moderator
Image
Visit 360texas.com
panocanarias
Posts: 28
Joined: Sat Sep 09, 2006 7:28 pm

Dave, could you try the direct link, please.
I don't have any problem here with Firefox (XP).
http://www.panocanarias.com/testzone/pano1.html
Thanks for testing ...
Salu2, Klaus
User avatar
Hopki
Gnome
Posts: 13004
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

I am also getting the blank page, IE 7, windows EX. Used the new direct link.
Cheers Hopki
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
User avatar
360Texas
Moderator
Posts: 3684
Joined: Sat Sep 09, 2006 6:06 pm
Location: Fort Worth, Texas USA
Contact:

Yes, that last link works fine. Grid sphere, 1 and 5 buttons work great
Dave
Pano2VR Forum Global Moderator
Image
Visit 360texas.com
User avatar
Hopki
Gnome
Posts: 13004
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Working now for me too.
Out of interest, I made this a while back Link
all the best hopki
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
panocanarias
Posts: 28
Joined: Sat Sep 09, 2006 7:28 pm

@Dave, @Hopki

Thank you both for testing !
Thanks for the link, Hopki. Will have a closer look.

Well, now I can go ahead...
.. trying to use a scrolling thumbnail-menu (Flash or Jquery driven) to trigger a "load pano action" ....
Surely that's nothing new and has been done before.
Anybody can point me to working examples ?

Salu2, Klaus
smithdwsn
Posts: 3
Joined: Thu May 13, 2010 7:28 pm

I have faced same problem when i am clicking on this tiny url. There is no contents will display. Done the message. I am using Internet Explore 8. So any problem with my IE.
panocanarias
Posts: 28
Joined: Sat Sep 09, 2006 7:28 pm

.. have faced same problem when i am clicking on this tiny url.
Very strange....
The page was automatically generated by P2VR (flash/html output).
There should be the pano window, loading initial pano.
No Javascript-Flash interacting (API) at this stage.
The only difference to 'normal' output is the slight change in p2q_embed_object.js, allowing 'externalinterface',
generated automatically, too. (See documentation: http://gardengnomesoftware.com/wiki/Pan ... Script_API).
Could this be a Tinyurl problem? What happens, when ckicking direct link ?
Can't reproduce this error.

Stumped, :?
Klaus
Post Reply