PTP2 : Add a hotspot manually using code not possible ?  

Share your tips and tricks here or get help with any Panotour 2.0+ problem!
No bug reports (of any kind) in this forum!
no avatar
aircamera
Member
 
Topic author
Posts: 120
Likes: 0 post
Liked in: 2 posts
Joined: Sat Jul 21, 2012 1:00 pm
Info

PTP2 : Add a hotspot manually using code not possible ?

by aircamera » Thu Jan 16, 2014 6:11 pm

Hi !

In PTP1.8, I used to duplicate some hotspots to have more "onhover" action possibilities. So I had "polygonhotspot1" and "polygonhotspot1bis" for example.
But now, since new code, it seems not possible anymore. The new hotspot is not visible. Even changing a hotspot name makes it disapear...
So I can't do with the new version what I need. I'm a bit lost with new code !

Is there something else inside another file to add if I need to dupplicate/create a hotspot ?

Thank you for your help !
Cyril

no avatar
mediavets
Moderator
 
Posts: 16415
Likes: 2 posts
Liked in: 130 posts
Joined: Wed Nov 14, 2007 2:12 pm
Location: Isleham, Cambridgeshire, UK.
Info

Re: PTP2 : Add a hotspot manually using code not possible ?

by mediavets » Thu Jan 16, 2014 6:26 pm

aircamera wrote:Hi !

In PTP1.8, I used to duplicate some hotspots to have more "onhover" action possibilities. So I had "polygonhotspot1" and "polygonhotspot1bis" for example.
But now, since new code, it seems not possible anymore. The new hotspot is not visible. Even changing a hotspot name makes it disapear...
So I can't do with the new version what I need. I'm a bit lost with new code !

Is there something else inside another file to add if I need to dupplicate/create a hotspot ?

Thank you for your help !
Cyril


I may have misunderstood but PTP hotspot styles are multi-instance so you can, for eaxmple, have multiple Polygon hotspot style and assign the one you wish to any particular polygon hotspot.

no avatar
aircamera
Member
 
Topic author
Posts: 120
Likes: 0 post
Liked in: 2 posts
Joined: Sat Jul 21, 2012 1:00 pm
Info

Re: PTP2 : Add a hotspot manually using code not possible ?

by aircamera » Thu Jan 16, 2014 6:35 pm

Thank you for your answer.
Yes, you are right. One style for many hotspots is usefull. But what I need is to duplicate a polygon hotspot with a different tooltip. So it depends where the mouse is, you will see tooltip1 or tooltip2...

no avatar
mediavets
Moderator
 
Posts: 16415
Likes: 2 posts
Liked in: 130 posts
Joined: Wed Nov 14, 2007 2:12 pm
Location: Isleham, Cambridgeshire, UK.
Info

Re: PTP2 : Add a hotspot manually using code not possible ?

by mediavets » Thu Jan 16, 2014 6:50 pm

aircamera wrote:Thank you for your answer.
Yes, you are right. One style for many hotspots is usefull. But what I need is to duplicate a polygon hotspot with a different tooltip. So it depends where the mouse is, you will see tooltip1 or tooltip2...


How can a one polygon hotspot have two tooltips...I am confused.

Do you have an online example?

no avatar
aircamera
Member
 
Topic author
Posts: 120
Likes: 0 post
Liked in: 2 posts
Joined: Sat Jul 21, 2012 1:00 pm
Info

Re: PTP2 : Add a hotspot manually using code not possible ?

by aircamera » Thu Jan 16, 2014 9:39 pm

A polygon hotspot can have only one tooltip. That's my problem !
And that's why I need to duplicate it...

no avatar
mediavets
Moderator
 
Posts: 16415
Likes: 2 posts
Liked in: 130 posts
Joined: Wed Nov 14, 2007 2:12 pm
Location: Isleham, Cambridgeshire, UK.
Info

Re: PTP2 : Add a hotspot manually using code not possible ?

by mediavets » Thu Jan 16, 2014 10:42 pm

aircamera wrote:A polygon hotspot can have only one tooltip. That's my problem !
And that's why I need to duplicate it...


But if you duplicate it surely one will overlay the other and only one tooltip - that associated with the upper copy - will be displayed?

I don't understand what you are trying to achieve.

no avatar
aircamera
Member
 
Topic author
Posts: 120
Likes: 0 post
Liked in: 2 posts
Joined: Sat Jul 21, 2012 1:00 pm
Info

Re: PTP2 : Add a hotspot manually using code not possible ?

by aircamera » Thu Jan 16, 2014 11:06 pm

http://www.aircamera.fr/visite_virtuelle/golf_les_gets_2/Golf%20des%20Gets.html

In this pano, when mouse is hoovering tee1 (polygon1), the green of tee1 (polygon2) appears. Cool !
But tooltip of polygon2 appears instead of polygon1. Not cool !

So before, I was able to dupplicate polygon2. (polygon2bis) and I used this copy with no tooltip.

Then I could do : when mouse is hoovering tee1 (polygon1), the green of tee1 (polygon2bis) appears with no tooltip. So the tooltip of tee1 (polygon1) appears again.

I'm sorry, it's diffucult to explain. I hope you'll understand...

Thank you again !
Cyril
Last edited by aircamera on Mon Jan 20, 2014 1:53 pm, edited 1 time in total.

no avatar
John360
Member
 
Posts: 39
Likes: 0 post
Liked in: 0 post
Joined: Thu Dec 12, 2013 3:53 pm
Info

Re: PTP2 : Add a hotspot manually using code not possible ?

by John360 » Thu Jan 16, 2014 11:38 pm

Cool :)

no avatar
aircamera
Member
 
Topic author
Posts: 120
Likes: 0 post
Liked in: 2 posts
Joined: Sat Jul 21, 2012 1:00 pm
Info

Re: PTP2 : Add a hotspot manually using code not possible ?

by aircamera » Fri Jan 17, 2014 1:45 pm

So, does any one knows why dupplicate a hotspot is not possible anymore ?
Just copy code and past it with a different name worked before...

no avatar
mediavets
Moderator
 
Posts: 16415
Likes: 2 posts
Liked in: 130 posts
Joined: Wed Nov 14, 2007 2:12 pm
Location: Isleham, Cambridgeshire, UK.
Info

Re: PTP2 : Add a hotspot manually using code not possible ?

by mediavets » Fri Jan 17, 2014 2:23 pm

aircamera wrote:So, does any one knows why dupplicate a hotspot is not possible anymore ?
Just copy code and past it with a different name worked before...


I think I was able to get the effect you wanted by simply drawing one polygon over another and using two hotspot styles assigning a different tooltip to each.

See screenshots - have had to place 4th screenshot in separate post as forum configured to allow only 3 images per post.
Attachments
1-ptp2rc2-poly-tooltip.jpg
2-ptp2rc2-poly-tooltip.jpg
3-ptp2rc2-poly-tooltip.jpg

no avatar
mediavets
Moderator
 
Posts: 16415
Likes: 2 posts
Liked in: 130 posts
Joined: Wed Nov 14, 2007 2:12 pm
Location: Isleham, Cambridgeshire, UK.
Info

Re: PTP2 : Add a hotspot manually using code not possible ?

by mediavets » Fri Jan 17, 2014 2:26 pm

4th screenshot - for overlapping polygon tooltips issue....
Attachments
4-ptp2rc2-poly-tooltip.jpg

no avatar
benji33
Kolor Team
 
Posts: 5848
Likes: 92 posts
Liked in: 199 posts
Joined: Tue Apr 09, 2013 10:59 am
Location: France
Info

Re: PTP2 : Add a hotspot manually using code not possible ?

by benji33 » Fri Jan 17, 2014 4:44 pm

Into main xml code, each hotspot have also a style which is described into the _skin.xml file.
Tooltip is managed into the hotspot and into the _messages_en.xml file. You need to create entry into this file for each hotspot new name.
Benjamin

no avatar
aircamera
Member
 
Topic author
Posts: 120
Likes: 0 post
Liked in: 2 posts
Joined: Sat Jul 21, 2012 1:00 pm
Info

Re: PTP2 : Add a hotspot manually using code not possible ?

by aircamera » Mon Jan 20, 2014 1:52 pm

Thank you for your help.
Thank you mediavets, what you achieved is exactly what I did before. It's not enough because I wanted hotspots to appear with "onover" action.
But you gave me the idea to create another polygon hotspot (1st for fairway / 2nd for green whitout tooltip / 3rd for green with tooltip) via PTP2 for each green.
Then, I have just copied geographic coordinates for each points. It works like this. :) http://www.aircamera.fr/visite_virtuelle/golf_les_gets_2/Golf%20des%20Gets.html

What's strange is that I can change values to something created by PTP2, but I can't create it myself...
Very frustrating...

no avatar
aircamera
Member
 
Topic author
Posts: 120
Likes: 0 post
Liked in: 2 posts
Joined: Sat Jul 21, 2012 1:00 pm
Info

Re: PTP2 : Add a hotspot manually using code not possible ?

by aircamera » Mon Jan 20, 2014 4:30 pm

Arf...

I have same problem when trying to add a button or anything else into skin.xml =(

In fact, it seems that we can't create anything manually. If i add a button via PTP2, it writes this code :
______________________________________________________
<!-- ************ -->
<!-- Button topleft -->
<!-- ************ -->
<layer name="button"
keep="true"
url="%FIRSTXML%/graphics/button/bouton.png"
align="topleft"
x="10"
y="10"
zorder="4"
visible="false"
onclick="buttonOnClick"
height="40"
width="40"
/>
<action name="buttonOnClick">

if (xml.scene != pano43,
mainloadscene(pano43);
);
lookat(-80.750000, 43.283333, 90.000000);

______________________________________________________


Now, if I copy and paste this into another virtualtour, it doesn't work !!!
Even if I copy attached files. There is no error message, but nothing appears =(

Is there anything else to change also in core.xml or message.xml ?

no avatar
benji33
Kolor Team
 
Posts: 5848
Likes: 92 posts
Liked in: 199 posts
Joined: Tue Apr 09, 2013 10:59 am
Location: France
Info

Re: PTP2 : Add a hotspot manually using code not possible ?

by benji33 » Wed Jan 22, 2014 9:34 am

No nothing in core.xml (only core functions) and in messages xml (used for tooltip for instance).
All tags are correctly closed ? <action ...> your code </action> for instance ?
Benjamin


Who is online

Users browsing this forum: No registered users and 6 guests

cron