Trouble with PanotourMaps plugin  

Share your tips and tricks here or get help with any Panotour 2.0 problem!
No bug reports (of any kind) in this forum!
User avatar
maartje.vens
New member
 
Posts: 8
Joined: Sun Mar 30, 2014 2:15 am
Location: Portugal

Trouble with PanotourMaps plugin

by maartje.vens » Sun Mar 30, 2014 2:29 am

Hey guys,

So it is awesome that with Panotour Pro 2 we now have the option to choose between having our map "above the virtual tour" or "apart from the virtual tour", but both seem to be lacking some extra options to it. What I need is a map that opens "apart from the virtual tour"so that icons and such get dragged along with it, but I need the transition to be smooth as it does with "above the virtual tour". If I remember correctly, in Panotour 1.8, this was automatic and in the code this was called "tween" but I can't seem to figure out how to make this transition now, as the code is different and seperated in many more xml files and javascript files. Any ideas?

Also, my map opens up to occupy 80% of the screen, which in turn crushes the panorama when I choose "apart from the virtual tour". How can I make it so that the panorama doesn't shrink?

Thanks in advance for anyone who decides to share their programming knowledge with me to help solve these two issues =)

User avatar
Destiny
Moderator
 
Posts: 4996
Joined: Mon Apr 26, 2010 11:55 pm
Location: Australia

Re: Trouble with PanotourMaps plugin

by Destiny » Sun Mar 30, 2014 6:56 am

Hey....

Do you have an example of that tween.. I can create it in 1.8 and see how it works in V2...

http://www.destinyvirtualtours.com/PTPV ... pTest.html

Not sure why it should be crashing... It might be something you are doing... The map is quite stable now.. You need a new API key to use with the plugin.. The old ones will not work..

Destiny..
Last edited by Destiny on Mon Mar 31, 2014 12:40 am, edited 1 time in total.

no avatar
mediavets
Moderator
 
Posts: 14163
Joined: Wed Nov 14, 2007 2:12 pm
Location: Isleham, Cambridgeshire, UK.

Re: Trouble with PanotourMaps plugin

by mediavets » Sun Mar 30, 2014 8:32 am

maartje.vens wrote:Also, my map opens up to occupy 80% of the screen, which in turn crushes the panorama when I choose "apart from the virtual tour". How can I make it so that the panorama doesn't shrink?



Then use the 'above the tour option'?
Attachments
1-ptp2-map.jpg
2-ptp2-map.jpg

User avatar
maartje.vens
New member
 
Posts: 8
Joined: Sun Mar 30, 2014 2:15 am
Location: Portugal

Re: Trouble with PanotourMaps plugin

by maartje.vens » Sun Mar 30, 2014 4:09 pm

Do you have an example of that tween.. I can create it in 1.8 and see how it works in V2...


http://www.pixelsinspace.pt/setubal/ this is one of my virtual tours made with panotour 1.8, and the map opens just the way I'm looking for. The actions for closing and opening look like this:

Code: Select all
<action name="openpanotourmaps">
      if (isflash,
      set(plugin[panotourmapsthumb].mapsopened,'true');
      tween(plugin[panotourmaps].y,0%);
      tween(area.y,95%);
      tween(area.height,100%);
      if (mapready,
      plugin[panotourmaps].showControls();
      ,);
      ,);
   </action>
    <action name="closepanotourmaps">
      if (isflash,
      set(plugin[panotourmapsthumb].mapsopened,'false');
      tween(plugin[panotourmaps].y,-95%);
      tween(area.y,0%);
      tween(area.height,100%);
      if (mapready,
      plugin[panotourmaps].hideControls();
      ,);
      ,);
   </action>


But by only copying the tween code to the action in panotour 2.0 code, this doesn't work well.

Then use the 'above the tour option'?


Can't, because I need the icons to be dragged along with the opening of the map. Please take a look at the example above to see the effect I want.

What I've come to find out is that, when I choose "above the virtual tour", this defines the map as a "KolorArea", and therefore may benefit from several "settings" like animation, overlay and such. So I'm guessing my best option is "apart from the virtual tour", but this means I have to alter the code. Tween seems to work, but the code invokes a javascript function with its own guidelines, see:
Code: Select all
   <action name="panotourmapsClosetourmap">
      if(ptplugin[panotourmaps].jsready,
         set(ptplugin[panotourmaps].state, false);
         js(invokePluginFunction(panotourmaps, openCloseMap, close));
      ,
         kolorMapJsReadyLoop-panotourmaps(close);
      );
   </action>
   
   
   <action name="panotourmapsOpentourmap">
      if(ptplugin[panotourmaps].jsready,
         set(ptplugin[panotourmaps].state, true);
         js(invokePluginFunction(panotourmaps, openCloseMap, open));
      ,
         kolorMapJsReadyLoop-panotourmaps(open);
      );
   </action>


I've tried to copy the code from my tween settings in the panotour 1.8 code but this doesn't work.

no avatar
mediavets
Moderator
 
Posts: 14163
Joined: Wed Nov 14, 2007 2:12 pm
Location: Isleham, Cambridgeshire, UK.

Re: Trouble with PanotourMaps plugin

by mediavets » Sun Mar 30, 2014 5:35 pm

maartje.vens wrote:
Then use the 'above the tour option'?


Can't, because I need the icons to be dragged along with the opening of the map. Please take a look at the example above to see the effect I want.


Do you mean the icon/tab I've highlighted in screenshot below?

User avatar
maartje.vens
New member
 
Posts: 8
Joined: Sun Mar 30, 2014 2:15 am
Location: Portugal

Re: Trouble with PanotourMaps plugin

by maartje.vens » Sun Mar 30, 2014 5:59 pm

mediavets wrote:
maartje.vens wrote:
Then use the 'above the tour option'?


Can't, because I need the icons to be dragged along with the opening of the map. Please take a look at the example above to see the effect I want.


Do you mean the icon/tab I've highlighted in screenshot below?


I can see that you have a button that closes the map. But the problem is that my map occupies 80% of the screen, and it comes down from the top. The button that opens the map should also be the one that closes the map, but it disappears underneath when I choose "above the tour". I need the button to be "fixed" to the map.

This would all the solved if I just checked the "display a close button", but this is a question of custom design. I want my own icon to open the map.

no avatar
mediavets
Moderator
 
Posts: 14163
Joined: Wed Nov 14, 2007 2:12 pm
Location: Isleham, Cambridgeshire, UK.

Re: Trouble with PanotourMaps plugin

by mediavets » Sun Mar 30, 2014 7:47 pm

maartje.vens wrote:
I can see that you have a button that closes the map. But the problem is that my map occupies 80% of the screen, and it comes down from the top. The button that opens the map should also be the one that closes the map, but it disappears underneath when I choose "above the tour". I need the button to be "fixed" to the map.

As you will have realised this is not available via the PTP 2.x GUI.

This would all the solved if I just checked the "display a close button", but this is a question of custom design. I want my own icon to open the map.

You can have a Map icon in control bars that opens/closes maps.

Or you could use a Simple of Toggle button plugin.

Otherwise you are on your own with hand coding.

User avatar
Destiny
Moderator
 
Posts: 4996
Joined: Mon Apr 26, 2010 11:55 pm
Location: Australia

Re: Trouble with PanotourMaps plugin

by Destiny » Mon Mar 31, 2014 12:40 am

Emm.. Tricky... As I understand it, you need a custom bottom to open/close your map...

I ran a few test but I cannot sync the tween of the map with the tween of the button...

http://www.destinyvirtualtours.com/PTPV ... pTest.html

Is this the kind of thing you are wanting to achieve... only better... :)

Destiny...

User avatar
maartje.vens
New member
 
Posts: 8
Joined: Sun Mar 30, 2014 2:15 am
Location: Portugal

Re: Trouble with PanotourMaps plugin

by maartje.vens » Mon Mar 31, 2014 3:12 am

mediavets wrote:
maartje.vens wrote:
I can see that you have a button that closes the map. But the problem is that my map occupies 80% of the screen, and it comes down from the top. The button that opens the map should also be the one that closes the map, but it disappears underneath when I choose "above the tour". I need the button to be "fixed" to the map.

As you will have realised this is not available via the PTP 2.x GUI.

This would all the solved if I just checked the "display a close button", but this is a question of custom design. I want my own icon to open the map.

You can have a Map icon in control bars that opens/closes maps.

Or you could use a Simple of Toggle button plugin.

Otherwise you are on your own with hand coding.


Yeah. I'm aware that what I'm looking for isn't possible through the GUI, that's why I'm looking for help with the code.

Destiny wrote:Emm.. Tricky... As I understand it, you need a custom bottom to open/close your map...

I ran a few test but I cannot sync the tween of the map with the tween of the button...

http://www.destinyvirtualtours.com/PTPV ... pTest.html

Is this the kind of thing you are wanting to achieve... only better... :)


Cool! That's not bad at all =) How did you do that? The icon actually drags along with the opening of the map, just not when it closes. Could you show me the code?

Thank you for your help, even going as far as testing it out yourself.

User avatar
Destiny
Moderator
 
Posts: 4996
Joined: Mon Apr 26, 2010 11:55 pm
Location: Australia

Re: Trouble with PanotourMaps plugin

by Destiny » Mon Mar 31, 2014 5:26 am

Sure.. the tween code is in red.. Just add a Toggle Button, then edit accordingly...

Its not the best, I will play with it more.. The tween needs to be linked to the action of the map opening and closing..

Destiny...


<!-- ************************************************** -->
<!-- Toggle Button : left -->
<!-- ************************************************** -->


<layer name="togglebutton"
keep="true"
url="%FIRSTXML%/graphics/togglebutton/globe-icon1.png"
align="left"
x="10"
y="10"
zorder="4"
state="true"
onclick="togglebuttonOnClick"
onout=""
visible="false"
/>

<action name="togglebuttonOnClick">
if (state,
set(state, false);showMap();
set(url,%FIRSTXML%/graphics/togglebutton/globe-icon2.png);
tween(plugin[togglebutton].x,47%);
,
set(state, true);hideMap();
set(url,%FIRSTXML%/graphics/togglebutton/globe-icon1.png);
tween(plugin[togglebutton].x,1%);
);
</action>

<events name="togglebuttonevents"
onTourStart="showtogglebutton();"
hidetourcontrols="hidetogglebutton();"
showtourcontrols="showtogglebutton();"
keep="true" />
<action name="hidetogglebutton">set(layer[togglebutton].visible, false);</action>
<action name="showtogglebutton">set(layer[togglebutton].visible, true);</action>

User avatar
maartje.vens
New member
 
Posts: 8
Joined: Sun Mar 30, 2014 2:15 am
Location: Portugal

Re: Trouble with PanotourMaps plugin

by maartje.vens » Mon Mar 31, 2014 12:00 pm

Destiny wrote:Sure.. the tween code is in red.. Just add a Toggle Button, then edit accordingly...

Its not the best, I will play with it more.. The tween needs to be linked to the action of the map opening and closing..

Destiny...


<!-- ************************************************** -->
<!-- Toggle Button : left -->
<!-- ************************************************** -->


<layer name="togglebutton"
keep="true"
url="%FIRSTXML%/graphics/togglebutton/globe-icon1.png"
align="left"
x="10"
y="10"
zorder="4"
state="true"
onclick="togglebuttonOnClick"
onout=""
visible="false"
/>

<action name="togglebuttonOnClick">
if (state,
set(state, false);showMap();
set(url,%FIRSTXML%/graphics/togglebutton/globe-icon2.png);
tween(plugin[togglebutton].x,47%);
,
set(state, true);hideMap();
set(url,%FIRSTXML%/graphics/togglebutton/globe-icon1.png);
tween(plugin[togglebutton].x,1%);
);
</action>

<events name="togglebuttonevents"
onTourStart="showtogglebutton();"
hidetourcontrols="hidetogglebutton();"
showtourcontrols="showtogglebutton();"
keep="true" />
<action name="hidetogglebutton">set(layer[togglebutton].visible, false);</action>
<action name="showtogglebutton">set(layer[togglebutton].visible, true);</action>


I tried it and it looks pretty good for now =) I'm trying to figure out how to move the button back to the top when I click on a marker on the map. The map closes but the icon is still down because I didn't click on it.


Return to Using Panotour / Panotour Pro

Who is online

Users browsing this forum: No registered users and 2 guests