In response to a Post by Rajesh in the Pano2VR Forum by using some new features in V7 using Logic Blocks to set "Margins" I’ve come up with the following example for a “Street View” style layout of a map and panorama side by side.
The layout is responsive across Desktop, Mobile including iPad, iPhone and Android.
Note: This example has a simplified skin and only contains elements associated with the functionality of the map. The map used in this example is OpenStreetMap.
Note: Click on any image to enlarge it.
Edit Skin Configuration
There are 3 options when publishing the project. We will start with them all set to false.
Desktop
The initial view shows a typical tour with a full viewport panorama view.
Note: There are 4 nodes in this tour
At the top of the viewport is the title of the tour and a description of the current panorama.
There are “chevron” buttons above the panorama and a “Show Map” button in the lower left corner.
Mousing over the chevron buttons displays the title of the node associated with the link.
The panorama can be interacted with (pano and zoom).
Clicking on the “Show Map” button opens the Google Map displaying pins representing the node hotspots and the node margin is reduced to 50% of the viewport width.
The active node displays a “radar” showing the pan direction of the panorama.
In the top right hand corner of the map and panorama panels is a “Maximise View” button.
Note: as the margin is changed the title/description and the “Show Menu” button have retained their spacial relationship with the panorama view.
If the aspect ratio of the browser window is changed to a portrait orientation the map and panorama view are optimised by stacking them on top of each other as opposed to being side by side.
Selecting the “maximise” button on the panorama view expands the view to fit the browser viewport.
In the top right hand corner of the viewport is a “minimise” button and the “show/hide map” button is hidden as we are still in the map view.
The panorama can be interacted with (pano and zoom).
Clicking on the chevron buttons will open a new panorama node.
Clicking on the “minimise” button will restore the panel view of the map and panorama and the map pin will display the updated active node.
Alternatively, the map view can be “maximised” and a new panorama selected by clicking on a different pin.
“Minimising” the map panel will reveal the selected panorama.
Note: at any time the browser can be resized and the panels will maintain their current state. ie Map & Panorama /Maximised Map/Maximised Panorama
Mobile Devices
Mobile devices use the same functionality as the Desktop browser. The following examples are the iPad Pro (12.9 inch) and iPhone 15 P (using the Apple Simulator)
Configuration Settings
#1. Start with Map: The map is open on start
#2. 3D Hotspot Preview/Tool Tip: When the mouse is over the chevron button a thumbnail and title of the location is shown.
#3. Show Variables: Used for development to check the status of variables used within the skin.
Note: I am working on a tutorial that covers the development of the functionality. Any feedback on the current project would be welcomed and appreciated. You can view the current versions via the link below.
Regards,
Tony