Page 1 of 1

Hide/Show specific hotspots inside a tour

PostPosted: Wed Oct 15, 2014 1:18 pm
by bdd
Many users complain about the fact that in a tour generated by Panotour Pro they can not specify which spots to hide or show, that the only available action hide them all at once.

To be able to group or categorize spots in Panotour Pro interface is a task planned for a future release.

But you can simulate such action by adding your own one managing spot styles as a category of hideable spots.

I wrote this action(s) for a great customer, and you'll find it in the attached archive.

Here is how to use it :

Just open your "User directory" with Panotour Pro menu, and then copy and unzip there the attached archive file.
4 new files should appear in the "actions" subfolder.

Then re-start Panotour Pro.
2 new "advanced" actions should appear in the action chooser widget : "Show Specific Hotspots" and "Hide Specific Hotspots"

Those actions take one parameter : the ID of the spot style you want to show/hide .
This ID cannot be found in Panotour Pro interface.
Just create all your spot styles, use them on some spots, then build the tour.
You'll find the ID of the hotspot styles at the beginning of the "xxx_skin.xml" file.
The ID is the "name" attribute of the "style" XML nodes .

Once a first build of the tour is done, this ID will not change anymore.
It can change from a tour to another, but it will never change in a single tour whatever the number of builds.
So you'll need to open the xxx_skin.xml file only when you will add some spot styles.

Gérald

Re: Hide/Show specific hotspots inside a tour

PostPosted: Wed Oct 22, 2014 10:57 am
by tianxun0601
bdd wrote:Many users complain about the fact that in a tour generated by Panotour Pro they can not specify which spots to hide or show, that the only available action hide them all at once.

To be able to group or categorize spots in Panotour Pro interface is a task planned for a future release.
Gérald


Hello, bdd:

I've tried the plugin you kindly provided, but have some question...
I check the index_skin.xml and found the spot id is "IconDefaultPointSpotStyle1".
then I went to the "Default Point Spot Style", go to the Advanced and choose "Hide Specific Spot" option
After these, I found the links all disappear. is that normal?
The thing I want to do is as the attached image no 2 shows.
I am confused if this plugin can help to achieve it,
or is there anything wrong?
please help ^^

Re: Hide/Show specific hotspots inside a tour

PostPosted: Thu Oct 23, 2014 3:40 am
by tianxun0601
Hi, I've tried this plugin successfully.
Before that, I should create new spot styles by myself, then specify the ID of spot to be hidden.
Now I can click on one spot to control the show/hide of another spot.
I wonder if it is possible to control some spot group to be shown/hidden from the beginning of the tour by just adjusting the url string?
therefore, I can make several sets of tour line in the same krpano project, which can be changed just using different url string.
Could you give me a hint?
Thanks for creating this convenient plugin again.

Re: Hide/Show specific hotspots inside a tour

PostPosted: Thu Oct 23, 2014 9:13 am
by benji33
If you add an attribute to the querystring as ?hidetypes=TYPE1|TYPE2

You can access this attribute into the krpano script by get(hidetypes)

So you'll have to hide all the TYPE1 and TYPE2 spots on the first init.

So fill the hotspotstyle array used by the hideshowhotspotstylecontent.tmpl file into the top of the startup action with this code, it should works :
Code: Select all
copy(mystringforseek, hidetypes);
   loop(mystringforseek != '',
      indexoftxt(mystringsearchindex, get(mystringforseek), '|', 0);
      if(mystringsearchindex GE 0,
         subtxt(mystringpart, get(mystringforseek), 0, get(mystringsearchindex));
         set(hotspotstyle[get(mystringpart)].visible, false);
         set(hotspotstyle[get(mystringpart)].realname, get(mystringpart));
         txtadd(mystringsearchtext, get(mystringpart), '|');
         txtreplace(mystringforseek, get(mystringsearchtext), '');
      ,
         set(hotspotstyle[get(mystringforseek)].visible, false);
         set(hotspotstyle[get(mystringforseek)].realname, get(mystringforseek));
         set(mystringforseek, '');
      );
      
   );

Re: Hide/Show specific hotspots inside a tour

PostPosted: Wed Jan 14, 2015 9:11 am
by tianxun0601
Hi BenJi33,

could you please tell me precisely that where should I insert this code into. Could it be the file "hideshowhotspotstylecontent.tmpl" or "index.xml" produced by that Panotour Pro ?

Sorry, I am really new to the plugin editting .... and thanks your kindly reply...

Re: Hide/Show specific hotspots inside a tour

PostPosted: Wed Jan 14, 2015 9:24 am
by tianxun0601
Sorry again, I think I've put it in the correct place, it works....!

I put it into the index.xml startup action, and it works,

thanks BenJi for your kindly share^^

Re: Hide/Show specific hotspots inside a tour

PostPosted: Tue Jan 20, 2015 4:06 am
by tianxun0601
Execuse me that I would like to ask how to put the below code into the plugin in order to let the code execute automatically and need not to hard code into the index.xml.
because when next time I rebuild the project the code below will disappear again.
thanks for your reply~ ^^




copy(mystringforseek, hidetypes);
loop(mystringforseek != '',
indexoftxt(mystringsearchindex, get(mystringforseek), '|', 0);
if(mystringsearchindex GE 0,
subtxt(mystringpart, get(mystringforseek), 0, get(mystringsearchindex));
set(hotspotstyle[get(mystringpart)].visible, false);
set(hotspotstyle[get(mystringpart)].realname, get(mystringpart));
txtadd(mystringsearchtext, get(mystringpart), '|');
txtreplace(mystringforseek, get(mystringsearchtext), '');
,
set(hotspotstyle[get(mystringforseek)].visible, false);
set(hotspotstyle[get(mystringforseek)].realname, get(mystringforseek));
set(mystringforseek, '');
);

);

Re: Hide/Show specific hotspots inside a tour

PostPosted: Tue Jan 20, 2015 4:12 am
by Destiny
Hi...

You can add custom xml code into your Custom User Directory. Located in: Documents > Kolor..>>

You will then be able to call it into any new Tour..

Destiny..

Re: Hide/Show specific hotspots inside a tour

PostPosted: Tue Jan 20, 2015 8:55 am
by tianxun0601
Sorry , I've found the correct place to put the code , i put it in the hideshowhotspotsstylecontent.tmpl and in the tag

<action name="hideshowhotspotstyleonnewpano">

and it works.....

many thanks.. Destiny....I already did that .... but I am still new to Krpano script so..... hope I can share my success in the future.^^

Re: Hide/Show specific hotspots inside a tour

PostPosted: Sat Apr 04, 2015 7:31 pm
by Alexpopov
Hello,
I would like to share the action, that i've created for my needs. It hides or show groups of hotspots by keyword. For buttons use the "Panorama Specific - Toggle button" plugin. Action searchs your keyword in the hotspots style and hide/show them.
For example: in the tour there are
5 point-hotspots with style "hs_red_spot";
5 point-hotspots with style "hs_small_spot";
5 polygon-hotspots with style "hs_door_pol";
5 polygon-hotspots with style "hs_blue_pol"

Add action to Panorama Specific - Toggle button:
to hide all hotspots with style "hs_red_spot" - call action "Hide Hotspots By Keyword" with keyword "red";
to hide all hotspots with style "hs_door_pol" - call action "Hide Hotspots By Keyword" with keyword "door";
to hide all point-hotspots - call action "Hide Hotspots By Keyword" with keyword "spot";
to hide all polygon-hotspots - call action "Hide Hotspots By Keyword" with keyword "pol";
to hide all polygon and point hotspots - call action "Hide Hotspots By Keyword" with keyword "hs";

Action hides/shows hotspots across the tour if use Panorama Specific - Toggle button.

I hope this action will help with big projects. If you improve its code or add some additional options, please post your version here.

Best!
Alexander.



--

Download the file here

Re: Hide/Show specific hotspots inside a tour

PostPosted: Sun Oct 04, 2015 8:31 pm
by panoguy
Hi Alexander,
thank you for this great plugin!
Would it be possible to choose a default state in advance,
ie. hide all hotspots with a certain keyword and let the user choose which ones he would like to see during runtime.

Re: Hide/Show specific hotspots inside a tour

PostPosted: Sun Oct 04, 2015 9:41 pm
by Cliquetsy
Using the call actions on tour events plugin you could do that, combined with the hide hotspots action.

Using one of the on tour start actions, set the hotspots you want to be hidden.

Re: Hide/Show specific hotspots inside a tour

PostPosted: Fri Oct 16, 2015 10:46 am
by michael_s
Hi Alexander,

thanks for the great plugin. Is there any way to hide a group of hotspots by URL in the whole tour?

I've a tour which shows holiday apartments and points of interest.
http://www.berchtesgaden360.de/pano/01.html

But I also need exactly the same tour without the holiday apartments. The holiday apartments then can show the place of their house in the panorama by deep linking. But in this tour all the hotspots of the holiday apartments should be hidden (not just in the deeplinked starting panorama).

http://www.berchtesgaden360.de/pano/01. ... &skipintro

Is there a way to make this work?

Re: Hide/Show specific hotspots inside a tour

PostPosted: Sat Oct 17, 2015 10:47 am
by Alexpopov
Is there a way to make this work?
Hi,
it's possible by adding some code to your build.
Like in previous post by Cliquetsy you need to hide specific hotspots at tour start
Using the call actions on tour events plugin you could do that, combined with the hide hotspots action.
Using one of the on tour start actions, set the hotspots you want to be hidden.

Then build tour and add some code to the end of YOURTOURNAME_skin.xml :
Code: Select all
<events name="myEvent" keep="true" onTourStart="if(hsdeeplink, alpoShowHotspots(Mykeyword))"/>

Instead Mykeyword use the keyword that you used to hide your hotspots on start tour event. Save this changes.
Now you can add url parameter &hsdeeplink=true to display you hotspots, like this:
Code: Select all
http://www.berchtesgaden360.de/pano/01.html?s=pano83&hsdeeplink=true


Cheers!

Re: Hide/Show specific hotspots inside a tour

PostPosted: Tue Oct 27, 2015 7:50 pm
by michael_s
Hi Alexander,

thanks for your help. I just tried it and it almost worked. I used the call action "React when the panorama starts, after introduction effects". With this I disabled a group of hotspots in the whole tour. Then I made the changes in the XML and added the URL parameter. And the first panorama shows the hotspots. So far it works. But when I skip to the next panorama or next group the hotspots don't show up.

By default all the hotspots should show up in the tour. So if people share a panorama the hotspots should be displayed. Only if a client wants to hide a group of hotspots, he should have the opportunity the hide it by the URL parameter. But then the hotspots should be hidden in the whole tour, not just the deeplinked starting panorama.

I'm not sure if I made something wrong or if there was a misunderstanding. I hope, there is still a solution.

Re: Hide/Show specific hotspots inside a tour

PostPosted: Tue Oct 27, 2015 8:32 pm
by Alexpopov
Hi,
try this instead of previous line of code:
Code: Select all
<events name="myEvent" keep="true" onTourStart="if(hsdeeplink, alpoShowHotspots(Mykeyword); set( events[myEvent].onnewscene, if(hsdeeplink, alpoShowHotspots(Mykeyword)) ))" />

I cannot test it, very busy. Let me know how it works.


Best!

Re: Hide/Show specific hotspots inside a tour

PostPosted: Tue Dec 15, 2015 4:07 pm
by Sluhi
I have modified plugin. You can use your hotspot as Toggle button to Show/hide specific Hotspot. Also you can customize duration for Mixer (like Crossfade effect). You can also use with "Call actions on tour events". Can use with original plugin version by Alex Popov in one tour. You can use different setting for different hotspots.
Example: Hotspot 1 (hide/show Hotspot 3 with toggle mode ), Hotspot 2 (hide/show Hotspot 3 with toggle mode and with mixer), Hotspot 3 (only hide Hotspot 3, without effect: toggle mode off, Mixer mode off ).

Re: Hide/Show specific hotspots inside a tour

PostPosted: Thu Jan 14, 2016 10:24 pm
by FunkyPunky
Interesting, great Plugin, Alexander!

Is it possible to hide polygon hotspots at tour start but only on mobile/touch devices?

Re: Hide/Show specific hotspots inside a tour

PostPosted: Sat Jan 16, 2016 3:10 pm
by Alexpopov
Is it possible to hide polygon hotspots at tour start but only on mobile/touch devices?

With some modifications of this action... You need to call it with device check if(device.mobile, call action)

Re: Hide/Show specific hotspots inside a tour

PostPosted: Fri Jun 10, 2016 2:10 pm
by SebMermoz
Hi,

Is there any way to have a button Hide/Show Specific Hotspots directly in the ControlBar ?

Thanks

Seb

Re: Hide/Show specific hotspots inside a tour

PostPosted: Fri Jun 10, 2016 5:20 pm
by Alexpopov
Is there any way to have a button Hide/Show Specific Hotspots directly in the ControlBar ?
Hi, it's possible , but with some xml editing, and it has to be done after every build. You can add show/ hide hotspot action to a Simple button for instance , then in the .._skin.xml copy its onclick action contents to the onclick action of any controll button ( for instance change in controlbar code onclick="setControlModeMoveTo();" change to onclick="alpoHideHotspots(keyword);" ). And remove simple button code (<layer name="button" keep="true" align="center"...../> )

Re: Hide/Show specific hotspots inside a tour

PostPosted: Fri Jun 10, 2016 7:50 pm
by SebMermoz
thank I'll work on it ! :-)

Re: Hide/Show specific hotspots inside a tour

PostPosted: Tue Jun 14, 2016 2:36 pm
by SebMermoz
Hi

I tried it,
so that's work to HIDE the specifics hotspot but I canot Show them after.

Have you an idea why ?

thanks


Alexpopov wrote:
Is there any way to have a button Hide/Show Specific Hotspots directly in the ControlBar ?
Hi, it's possible , but with some xml editing, and it has to be done after every build. You can add show/ hide hotspot action to a Simple button for instance , then in the .._skin.xml copy its onclick action contents to the onclick action of any controll button ( for instance change in controlbar code onclick="setControlModeMoveTo();" change to onclick="alpoHideHotspots(keyword);" ). And remove simple button code (<layer name="button" keep="true" align="center"...../> )

Re: Hide/Show specific hotspots inside a tour

PostPosted: Fri Sep 15, 2017 8:20 am
by Annis
Use the Call Actions on Tour Events plugin and on "react on new panorama after intro effects" assign the action of hiding your hotspots.

http://www.kolor.com/wiki-en/action/vie ... ra_Plugins