Web viewer documentation
Welcome to Panoramax Web Viewer documentation ! It will help you through all phases of setup, run and develop on Panoramax JS pictures viewer.
Install the viewer
Many options are available for installing the viewer.
Panoramax viewer is available on NPM as @panoramax/web-viewer package.
If you want the latest version (corresponding to the develop
git branch), you can use the develop
NPM dist-tag:
You can rely on various providers offering hosted NPM packages, for example JSDelivr.
You can install and use Panoramax web client based on code provided in this repository.
This library relies on Node.js 16, which should be installed on your computer. Then, you can build the library using these commands:
Basic usage
First, you need to make sure everything is ready to create the viewer:
Make sure to have both JS and CSS code available in your HTML head
part:
<!-- Change the actual path depending of where you installed the library -->
<link rel="stylesheet" type="text/css" href="web-viewer/build/index.css" />
<script src="web-viewer/build/index.js"></script>
And you also node a div
somewhere in your HTML:
Then, the div is populated with this JavaScript code:
Make sure to import both JS and CSS in your code:
And have access in some way to a classic div
HTML element:
Then, the div is populated with this JavaScript code:
Beyond classic viewer, other widgets are available and can be tested online:
Standalone-map
A simple map for showing coverage only.
var myMap = new Panoramax.StandaloneMap(
"map", // Div ID
"https://api.panoramax.xyz/api" // STAC API endpoint
);
Editor
A map and photo viewer, focused on a single sequence, for previewing edits made to it.
var myEditor = new Panoramax.Editor(
"editor", // Div ID
"https://api.panoramax.xyz/api", // STAC API endpoint
{
selectedSequence: "id-to-an-existing-sequence", // Sequence ID (mandatory)
selectedPicture: "id-to-a-picture-in-this-sequence" // Picture ID (optional)
}
);
User interface
Keyboard shortcuts
All interactions with the viewer can be done using the mouse, and some can be also done using keyboard.
- Arrows (or 2/4/8/6 on keypad): move inside the picture, or move the map
- Page up/down (or 3/9 on keypad) : go to next or previous picture in sequence
- + / - : zoom picture or map in or out
- * (or 5 on keypad) : move picture or map to its center
- Home / ↖️ (or 7 on keypad) : switch map and picture as main shown component
- End (or 1 on keypad) : hide minimized map or picture
- Space : play or pause current sequence