A pop up text box when a polygon hotspot is clicked.

Q&A about the latest versions
Post Reply
NancyW
Posts: 11
Joined: Thu Jul 10, 2025 9:58 am

Hello,

I'm trying to build a simple text box that pops up when a polygon hotspot is clicked. I am working with hundreds of polygons whose titles are different. How do I do this?
User avatar
Tony
Posts: 1411
Joined: Mon Feb 15, 2010 6:54 am
Location: Adelaide, South Australia
Contact:

Hi,

This “little bit's” tutorial may help you, it shows you how to apply a Mouseover Action to a Polygon Hotspot.

https://tonyredhead.com/pano2vr-little- ... er-polygon

This is another tutorial that opens a popup text box.

https://tonyredhead.com/pano2vr/polygon-hotspots-proxy

Tony
Tony Redhead | Panoramic Photographer | mobile: +61438501002 | website: https://tonyredhead.com - https://redsquare.com | Pano2VR Tutorials: https://tonyredhead.com/pano2vr | instagram: https://www.instagram.com/tonyredhead/
NancyW
Posts: 11
Joined: Thu Jul 10, 2025 9:58 am

Thank you, Tony!

I have another request, I have 5 tour nodes each with 100 hotspot polygons. I have created a title for each of the polygons in the first node and I would like like to copy the titles automatically over the 5 nodes (not geometries, I already drew them manually on all 5 nodes). How do I do this? They have ids from Poly01 to Poly100. I am using a custom tooltip and/or pop up to display the title on hover and/or on mouse click
User avatar
Tony
Posts: 1411
Joined: Mon Feb 15, 2010 6:54 am
Location: Adelaide, South Australia
Contact:

Hi Nancy,
I have 5 tour nodes each with 100 hotspot polygons. I have created a title for each of the polygons in the first node and I would like like to copy the titles automatically over the 5 nodes (not geometries, I already drew them manually on all 5 nodes). How do I do this?
I do have a way to do it, it depends if you are comfortable using a terminal and running a Python script!

.p2vr files are a type of XML file and the script is designed to make sure that the titles for specific hotspots are consistent across different panoramic nodes in a project.

What the Script Does
So you have your 5 nodes and each node has a 100 polygon hotspots named Poly01 - 100 and you want each Poly in each node to have exactly the same name as they have in Node1. Instead of manually typing that title into every single hotspot for every single node, this script automates the process for you.

Here's how it works:

It's a "Title Copier": It finds a specific hotspot title in your first panoramic view (the one called "node1") for the entry Poly01.

It's a "Title Updater": It then takes that title and goes through all the other panoramic nodes in the p2vr file. If it finds a matching hotspot i.e Poly01, it automatically updates its title to be the same as the one it found in "node1."

After it's done Poly01 it goes back and does Poly02 then Poly03 etc.

It's a "Smart Updater": It's careful not to change anything that's already correct. It also skips any "master" nodes, so you don't have to worry about it messing with those.

It's a "File Saver": After it's done, it saves the changes to a new file so you can easily compare it to the original, or it can overwrite the old file if you tell it to.

Here's how to Use the Script

1. Terminal Setting: You open a terminal, you set the directory to the location of the .p2vr file.

2. Location: The python script is placed in the same folder.

3. Which Script: You enter the name of the script in the terminal

4. Which file: The script will ask you to either specify a .p2vr file or you can just press Enter to process all .p2vr files in the current folder.

5. How many hotspots: The script will ask you how many hotspots you want to sync. For example, if you want to sync the titles for Poly01, Poly02, and Poly03, you would just enter 3.

6. You choose how to save: Finally, it asks if you want to create a brand new file with the changes or overwrite the existing one. It even gives you a chance to confirm if you choose to overwrite, just to be safe.

So, in a nutshell, this script is a simple, straightforward way to keep your hotspot titles consistent across all your panoramic scenes without all the manual work. It's a real time-saver for repetitive editing tasks.

I can let you have the file but it comes with no quarantees or alternatively you can just load you .p2vr file and I'll run it locally myself.

Cheers,

Tony
Tony Redhead | Panoramic Photographer | mobile: +61438501002 | website: https://tonyredhead.com - https://redsquare.com | Pano2VR Tutorials: https://tonyredhead.com/pano2vr | instagram: https://www.instagram.com/tonyredhead/
NancyW
Posts: 11
Joined: Thu Jul 10, 2025 9:58 am

Hi Tony,

Sounds like the perfect script, I'm familiar with python scripting. I'd like to try it out and if I encounter a problem, I'll send you the file. I am working with many similar projects so I wouldn't want to keep involving you very time. If you could send it to me, I'd really appreciate it!

Nancy
User avatar
Tony
Posts: 1411
Joined: Mon Feb 15, 2010 6:54 am
Location: Adelaide, South Australia
Contact:

Hi Nancy,

I just sent you a PM.

Tony
Tony Redhead | Panoramic Photographer | mobile: +61438501002 | website: https://tonyredhead.com - https://redsquare.com | Pano2VR Tutorials: https://tonyredhead.com/pano2vr | instagram: https://www.instagram.com/tonyredhead/
Post Reply