Jump to: navigation, search

Panotour - Advanced - Using the Keepview tag

Logo-Panotour-Pro-2010.png Panotour Pro only    This feature is available only in the pro version of Panotour.

Intro - What is Keepview

This page will show you to modify your tours so that you keep the same point of view when switching between panoramas, using the Keepview tag.

For this, two cases will be explained:

  • 1rst case - Keepview navigation for the whole tour: In this case, the entire tour will use the same navigation type of keeping the view from one panorama to another, which is useful and often used for streetview or day/night or before/after type tours
  • 2nd case - Keepview and default navigation in the same tour: In this case the tour uses two types of navigation, keepview and the default, so you can navigate your tour normally but offer the possibility of switching between select panoramas keeping the same view (between a day/night panorama, or before/during/after construction, etc...).


If, for any reason you are using Panotour Pro 2.3, follow this tutorial instead.



Requirements and notes

  • You need Panotour Pro to follow this tutorial, the standard version does not allow you to modify xml.
  • You have to be able to modify XML files. Although no knowledge of XML syntax is required for this tutorial, you need to have no fear of editing such files. The use of editors such as Notepad ++or Sublimetext is recommended to view XML files clearly.
  • These changes must be done on your built virtual tour, so make sure you are finished building your tour in Panotour before editing, lest you lose all your modifications from rebuilding your tour.
  • The modified code will vary slightly depending on the tour, the transitions used, etc... , so although the edits are simple, you must make this to the action generated by Panotour for that tour, you will not be able to effectively copy the same modified code from one tour to another.
  • For these effects to work, your panoramas (the original equirectangular images) must all be aligned in the same direction. Aligning them from Panotour will not work in this case. This is especially important for the Day/Night effect, the panoramas must be aligned perfectly (for example: if there is a lighthouse in your panorama, it must be in exactly the same place in both panoramas) for the look to be convincing and not confusing to your viewers.
  • The transitions you have set in your tour will be kept, so if for example you set the target transition to "load panorama view" or "load custom view" then that view will be loaded, the view will not be kept when switching from one panorama to another.



1rst case - Keepview navigation for the whole tour

Once you've built your tour, in Panotour Pro go to Edit > Open last exported project directory.
You are going to modify the YOURTOUR_core.xml file.

Panotour - 250 - Tutorial - Keepview001.png


YOURTOUR_core.xml

  • Open YOURTOUR_core.xml in a text editor.
  • Search (Ctrl+F) for <action name="mainloadscene">. This will bring you to the mainloadscene action, which is the action that all you navigation takes when you move from one panorama to another. Your action may have more content than in the examples below, that is fine, it varies on your settings when you built the tour, but the changes and steps remain the same.
  • Now search for the term MERGE, and replace it with KEEPVIEW.
  • Save the file and you're done!





2nd case - Keepview and default navigation in the same tour

For this case and example, your tour will have two different types of navigation:

  • The default method, using hotspots, menus, and/or thumbnails bars.
  • A way to navigate between the two (or more) different panoramas, usually either using buttons on the interface or hotspots on the panoramas. It's the navigation of these buttons that we are going to modify to keep the same view when switching between the two panoramas.
    • If using a button, it would be recommended to use one of the panorama specific buttons that you can find and download here.


Once you've built your tour, in Panotour Pro go to Edit > Open last exported project directory.
You are going to modify two xml files for this navigation, first YOURTOUR_core.xml and then YOURTOUR_skin.xml if you will be using buttons, or 'YOURTOUR.xml if you will be using hotspots.

Video tutorial Watch the video and/or follow the steps below.

Panotour - 250 - Tutorial - Keepview005.png


YOURTOUR_core.xml

  • Open YOURTOUR_core.xml in a text editor.
  • Search (Ctrl+F) for <action name="mainloadscene">. This will bring you to the mainloadscene action, which is the action that all you navigation takes when you move from one panorama to another. Your action may have more content than in the examples below, that is fine, it varies on your settings when you built the tour, but the changes and steps remain the same.
  • Select the whole action, copy it (Ctrl+C) and paste (Ctrl+V) a copy underneath.
  • Now for your edits:
    1. In your new action, change the name from mainloadscene to mainloadscenewithkeepview.
    2. Then, search for the term MERGE in your new action, and replace it with KEEPVIEW.
  • Save the file.



YOURTOUR_skin.xml (if using buttons to switch)

  • Now open YOURTOUR_skin.xml in a text editor.
  • Search for your button's parameters. If you are using the toggle button, search (Ctrl+F) for toggle
  • Change every mainloadscene in your toggle button to mainloadscenewithkeepview
  • Repeat for as many pairs of panoramas and toggle buttons there are in your tour.
  • Save, and you're done.


YOURTOUR.xml (if using hotspots to switch)

  • Now open YOURTOUR.xml in a text editor.
  • Search for your hotspot's parameters in the file by searching for the spot's style name without spaces (for example, for a style called Day Night switch spot, search for DayNightswitchspot)
  • Change every mainloadscene of your selected hotspot to mainloadscenewithkeepview
  • Repeat for as many pairs of panoramas and hotspots there are in your tour.
  • Save, and you're done.



YOURTOUR_core.xml & YOURTOUR_skin.xml (if using prev/next buttons or actions to switch)

These steps are useful if you are using the Load Next/prev Scene plugins or actions, but want to use this type of action without Keepview in the rest of your tour.

  • Open YOURTOUR_core.xml in a text editor.
  • Search for <!-- Load Next Scene --> and <!-- Load Previous Scene -->,
  • Duplicate them like you did for the mainloadscene action.
  • Rename the new actions to loadNextScenewithkeepview and loadPreviousScenewithkeepview
  • Change both mainloadscene of your new actions to mainloadscenewithkeepview
  • Save.



Now for your plugins:

  • Open YOURTOUR_skin.xml in a text editor.
  • Search for your plugin that uses these actions.
    • In this example we are using a combination of the Call Actions On Tour Events plugin which calls the Load Next Scene action, so search for eventsPlugin.
  • Replace loadNextScene with loadNextScenewithkeepview
  • Save, and you're done.


Note: If your hotspots are using the Load next scene action, then it's YOUTOUR.xml that you want to replace to change the action



Watch the video

Fullscreen is recommended, there is no sound in this short video.









BACK TO: Documentation / Panotour Documentation