Hide/Show specific hotspots inside a tour  

User avatar
bdd
Kolor Team
 
Topic author
Posts: 2385
Likes: 9 posts
Liked in: 93 posts
Joined: Tue Jan 18, 2011 4:05 pm
Info

Hide/Show specific hotspots inside a tour

by bdd » Wed Oct 15, 2014 1:18 pm

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
Attachments
hideShowSpecificHotspotsStyleActions.zip
Hide/Show specific hotspots action
(1.64 KiB) Downloaded 231 times

AlbertdeMonaco likes this post.

no avatar
tianxun0601
Member
 
Posts: 10
Likes: 0 post
Liked in: 0 post
Joined: Mon Oct 13, 2014 9:43 am
Info

Re: Hide/Show specific hotspots inside a tour

by tianxun0601 » Wed Oct 22, 2014 10:57 am

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 ^^
Attachments
2014-10-22_175302.png
2014-10-22_174709.png

no avatar
tianxun0601
Member
 
Posts: 10
Likes: 0 post
Liked in: 0 post
Joined: Mon Oct 13, 2014 9:43 am
Info

Re: Hide/Show specific hotspots inside a tour

by tianxun0601 » Thu Oct 23, 2014 3:40 am

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.
Attachments
2014-10-23_102150.png

User avatar
benji33
Kolor Team
 
Posts: 5305
Likes: 43 posts
Liked in: 148 posts
Joined: Tue Apr 09, 2013 10:59 am
Location: France
Info

Re: Hide/Show specific hotspots inside a tour

by benji33 » Thu Oct 23, 2014 9:13 am

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, '');
      );
      
   );

no avatar
tianxun0601
Member
 
Posts: 10
Likes: 0 post
Liked in: 0 post
Joined: Mon Oct 13, 2014 9:43 am
Info

Re: Hide/Show specific hotspots inside a tour

by tianxun0601 » Wed Jan 14, 2015 9:11 am

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...

no avatar
tianxun0601
Member
 
Posts: 10
Likes: 0 post
Liked in: 0 post
Joined: Mon Oct 13, 2014 9:43 am
Info

Re: Hide/Show specific hotspots inside a tour

by tianxun0601 » Wed Jan 14, 2015 9:24 am

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^^

no avatar
tianxun0601
Member
 
Posts: 10
Likes: 0 post
Liked in: 0 post
Joined: Mon Oct 13, 2014 9:43 am
Info

Re: Hide/Show specific hotspots inside a tour

by tianxun0601 » Tue Jan 20, 2015 4:06 am

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, '');
);

);

User avatar
Destiny
Moderator
 
Posts: 7624
Likes: 2 posts
Liked in: 193 posts
Joined: Mon Apr 26, 2010 11:55 pm
Location: Australia
Info

Re: Hide/Show specific hotspots inside a tour

by Destiny » Tue Jan 20, 2015 4:12 am

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..

no avatar
tianxun0601
Member
 
Posts: 10
Likes: 0 post
Liked in: 0 post
Joined: Mon Oct 13, 2014 9:43 am
Info

Re: Hide/Show specific hotspots inside a tour

by tianxun0601 » Tue Jan 20, 2015 8:55 am

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.^^

no avatar
Alexpopov
Member
 
Posts: 89
Likes: 19 posts
Liked in: 25 posts
Joined: Mon Mar 24, 2014 8:18 pm
Info

Re: Hide/Show specific hotspots inside a tour

by Alexpopov » Sat Apr 04, 2015 7:31 pm

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

8 people like this post.

User avatar
panoguy
Member
 
Posts: 101
Likes: 1 post
Liked in: 0 post
Joined: Mon Jan 25, 2010 3:55 am
Location: Bavaria
Info

Re: Hide/Show specific hotspots inside a tour

by panoguy » Sun Oct 04, 2015 8:31 pm

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.

User avatar
Cliquetsy
Member
 
Posts: 1309
Likes: 102 posts
Liked in: 119 posts
Joined: Thu May 16, 2013 4:10 pm
Info

Re: Hide/Show specific hotspots inside a tour

by Cliquetsy » Sun Oct 04, 2015 9:41 pm

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.

Alexpopov likes this post.

no avatar
michael_s
New member
 
Posts: 7
Likes: 0 post
Liked in: 0 post
Joined: Fri Sep 18, 2015 11:11 am
Info

Re: Hide/Show specific hotspots inside a tour

by michael_s » Fri Oct 16, 2015 10:46 am

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?

no avatar
Alexpopov
Member
 
Posts: 89
Likes: 19 posts
Liked in: 25 posts
Joined: Mon Mar 24, 2014 8:18 pm
Info

Re: Hide/Show specific hotspots inside a tour

by Alexpopov » Sat Oct 17, 2015 10:47 am

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!

no avatar
michael_s
New member
 
Posts: 7
Likes: 0 post
Liked in: 0 post
Joined: Fri Sep 18, 2015 11:11 am
Info

Re: Hide/Show specific hotspots inside a tour

by michael_s » Tue Oct 27, 2015 7:50 pm

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.

no avatar
Alexpopov
Member
 
Posts: 89
Likes: 19 posts
Liked in: 25 posts
Joined: Mon Mar 24, 2014 8:18 pm
Info

Re: Hide/Show specific hotspots inside a tour

by Alexpopov » Tue Oct 27, 2015 8:32 pm

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!

no avatar
Sluhi
New member
 
Posts: 8
Likes: 0 post
Liked in: 1 post
Joined: Wed May 27, 2015 12:27 am
Info

Re: Hide/Show specific hotspots inside a tour

by Sluhi » Tue Dec 15, 2015 4:07 pm

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 ).
Attachments
hs-hotspot-modified.zip
(1.95 KiB) Downloaded 127 times

Alexpopov likes this post.

no avatar
FunkyPunky
Member
 
Posts: 224
Likes: 10 posts
Liked in: 4 posts
Joined: Sat Jan 25, 2014 11:50 pm
Info

Re: Hide/Show specific hotspots inside a tour

by FunkyPunky » Thu Jan 14, 2016 10:24 pm

Interesting, great Plugin, Alexander!

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

no avatar
Alexpopov
Member
 
Posts: 89
Likes: 19 posts
Liked in: 25 posts
Joined: Mon Mar 24, 2014 8:18 pm
Info

Re: Hide/Show specific hotspots inside a tour

by Alexpopov » Sat Jan 16, 2016 3:10 pm

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)

no avatar
SebMermoz
Member
 
Posts: 36
Likes: 4 posts
Liked in: 2 posts
Joined: Wed Jan 27, 2016 9:37 am
Info

Re: Hide/Show specific hotspots inside a tour

by SebMermoz » Fri Jun 10, 2016 2:10 pm

Hi,

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

Thanks

Seb

no avatar
Alexpopov
Member
 
Posts: 89
Likes: 19 posts
Liked in: 25 posts
Joined: Mon Mar 24, 2014 8:18 pm
Info

Re: Hide/Show specific hotspots inside a tour

by Alexpopov » Fri Jun 10, 2016 5:20 pm

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"...../> )

no avatar
SebMermoz
Member
 
Posts: 36
Likes: 4 posts
Liked in: 2 posts
Joined: Wed Jan 27, 2016 9:37 am
Info

Re: Hide/Show specific hotspots inside a tour

by SebMermoz » Fri Jun 10, 2016 7:50 pm

thank I'll work on it ! :-)

no avatar
SebMermoz
Member
 
Posts: 36
Likes: 4 posts
Liked in: 2 posts
Joined: Wed Jan 27, 2016 9:37 am
Info

Re: Hide/Show specific hotspots inside a tour

by SebMermoz » Tue Jun 14, 2016 2:36 pm

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"...../> )


Who is online

Users browsing this forum: No registered users and 2 guests