Hotspot over polygon?   [SOLVED] - View the solution

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
pbetancourt
Member
 
Topic author
Posts: 142
Likes: 25 posts
Liked in: 7 posts
Joined: Mon Oct 14, 2013 3:03 pm
Info

Hotspot over polygon?

by pbetancourt » Fri Aug 04, 2017 1:13 am

I'm building a tour with both polygons and hotspots. The problem is that polygons are over some of my hotspots and I cannot click on them. Any way to get the hotspor OVER the polygon? with polygons the layer order depend on what did you draw first, but here I don't know how to solve it.
Captura de pantalla 2017-08-03 a la(s) 21.08.19.jpg
Captura de pantalla 2017-08-03 a la(s) 21.08.19.jpg (33 KiB) Viewed 874 times


Many thanks

User avatar
Annis
Kolor Team
 
Posts: 6063
Likes: 801 posts
Liked in: 444 posts
Joined: Mon Aug 12, 2013 12:47 pm
Location: France
Info

Re: Hotspot over polygon?

by Annis » Mon Aug 07, 2017 1:15 pm

You should place the polygons before the point hotspots.

Otherwise, edit the xml to change the zorder of the hotspots to bring your point hotspots forward.

no avatar
mikepostons
Member
 
Posts: 20
Likes: 4 posts
Liked in: 5 posts
Joined: Mon Apr 25, 2016 1:24 pm
Info

Re: Hotspot over polygon?

by mikepostons » Tue Oct 10, 2017 2:36 pm

Just ran into the same issue. Created the polygon first and then added the hotspot second. The Polygon still ended up above the hotspot? Can anyone give an example of where the z-order needs to be changed in the XML, there are a lot of instances of z-order in that file.

User avatar
Annis
Kolor Team
 
Posts: 6063
Likes: 801 posts
Liked in: 444 posts
Joined: Mon Aug 12, 2013 12:47 pm
Location: France
Info

Re: Hotspot over polygon?  [SOLVED]

by Annis » Mon Oct 16, 2017 4:12 pm

Try what's mentioned here: https://krpano.com/forum/wbb/index.php? ... #post66049

Try adding renderer="css3d" to the point hotspot's code so that it displays above the polygon. It might be enough to put it directly in the hotspot style (in the _skin.xml) instead of each individual hotspot.

no avatar
mikepostons
Member
 
Posts: 20
Likes: 4 posts
Liked in: 5 posts
Joined: Mon Apr 25, 2016 1:24 pm
Info

Re: Hotspot over polygon?

by mikepostons » Wed Oct 25, 2017 1:14 pm

Thanks @Annis that worked great. Only needed to add to _skin.xml file. Only issue is the XML file obviously get overwritten on each build. My solution to this is create a backup of that file (with render="css3" added to the specific spots) and then delete and replace the new file that is built. Unless there's a more permanent solution?

User avatar
Annis
Kolor Team
 
Posts: 6063
Likes: 801 posts
Liked in: 444 posts
Joined: Mon Aug 12, 2013 12:47 pm
Location: France
Info

Re: Hotspot over polygon?

by Annis » Wed Oct 25, 2017 1:48 pm

Yes every time you rebuild the tour the xml is overwritten.

If you know which spot style you are using you could create an xml file to include using the "include an xml" plugin. http://www.kolor.com/wiki-en/action/vie ... ude_an_XML
That way your bit of code is automatically added on tour build instead of being rewritten in the tour's xml.

Say for example this is your spot style (don't mind my spot name ;) ):
<style name="IconGRAAAAARG"
url="%FIRSTXML%/spots/hotspot_plan_user_defaultpoint5.png"
visible="false"
onhover="onhoverIconGRAAAAARG"
onout="onoutIconGRAAAAARG"

/>



Instead of adding renderer="css3d" to the spot style, copy the code for your spot style into a new xml file. Keep the name and get rid of the rest, and this time add renderer="css3d". So with my example it'd become something like:

<style name="IconGRAAAAARG"
renderer="css3d"
/>


Save that file somewhere on your computer (I save all the include files in the Panotour user directory for safe keeping) and point to that file with the Include an xml plugin.

This should work, but I'm not much of a coder...

no avatar
mikepostons
Member
 
Posts: 20
Likes: 4 posts
Liked in: 5 posts
Joined: Mon Apr 25, 2016 1:24 pm
Info

Re: Hotspot over polygon?

by mikepostons » Wed Oct 25, 2017 1:49 pm

Thanks Annis, that's really helpful I will give it a go! Cheers

Annis likes this post.


Who is online

Users browsing this forum: No registered users and 2 guests