OpenNext command arguments

Q&A about the latest versions
Post Reply
cliquot22
Posts: 3
Joined: Thu Sep 25, 2014 1:33 pm

I'm trying to create a panorama tour (standard Pano2VR edition) with a Google Map. I've tried to copy the sample html code over to my code but something is getting lost in translation. What is the format of the argument for the OpenNext() function? I keep getting an error saying "invalid node id: arc" where "arc" is the id of the next panorama. I've tried "{"+this.ggId+"}" and "{"+panorama.plink+"}" which should be the same and "panorama.plink". But can't seem to get the format of the argument correct.

Here is the function I use to create the Google map markers

Code: Select all

	function createMarker(panoData) {
		var panorama = panoData[0];
		var loc = new google.maps.LatLng(panorama.lat,panorama.lng);
		var html = '<p align="center" style="bgcolor:#FFFFFF"><img src="thumbnails/' + panorama.pic + '"  width="80px" height="80px" /><br />' + panorama.name + '</p>';
		
		var marker = new google.maps.Marker({position: loc, title: panorama.name, ggId: panorama.plink});
		// create a listener for each marker (must use global variable for the map)
		google.maps.event.addListener(marker, 'click', function() {
			 infowindow.setContent(html);
			 infowindow.open(map, marker);
			 pano.openNext("{" + this.ggId + "}"); 
			 panoCaption.innerHTML = panorama.desc;
		});
		return marker;
	}
And for the XML data files for each panorama, I added a named id like this:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<panorama id="arc">
  <view fovmode="0" pannorth="142">
....
User avatar
360Texas
Moderator
Posts: 3684
Joined: Sat Sep 09, 2006 6:06 pm
Location: Fort Worth, Texas USA
Contact:

Google Map is a feature only in the Pano2VR PRO version. Documentation is found here.

Hope this helps

http://ggnome.com/wiki/Pano2VR_Pro%3A_A ... ML5_output
Dave
Pano2VR Forum Global Moderator
Image
Visit 360texas.com
cliquot22
Posts: 3
Joined: Thu Sep 25, 2014 1:33 pm

Thanks for the project link. The Google map is also available in the standard edition but that isn't quite the question. Did you mean to say that the OpenNext function is only available in the PRO edition?

I'm writing my own Google maps functions, I would just like to know how to access a panorama using the OpenNext function so that I can put it in the same DIV at the original.
User avatar
360Texas
Moderator
Posts: 3684
Joined: Sat Sep 09, 2006 6:06 pm
Location: Fort Worth, Texas USA
Contact:

Then you might consider creating 1 point hotspot pointing from #1 to pano #2. Then go back to pano #2 and create 1 point hotspot pointing back to pano#1.

Then maybe while using pano2vr standard and open next panorama will have a hotspot guide to and from both panoramas
Dave
Pano2VR Forum Global Moderator
Image
Visit 360texas.com
cliquot22
Posts: 3
Joined: Thu Sep 25, 2014 1:33 pm

I figured out the pano id. It is the name of the XML data file. Once I added that to pano.openNext("my pano_out.xml") it works.
Post Reply