Viewer
The panorama viewer for a tour you own, with room and floor selection and the
authoring controls: rotate the view, save a default direction, capture a
thumbnail. Reads through tours.get(id).
Props
| Prop | Type | Description |
|---|---|---|
tourId (required) | string | Tour to open. |
initialScanId | string | Panorama to open on. Defaults to the tour's defaultScanId. |
isPublic | boolean | Hides every authoring control. Defaults to false. For anonymous visitors prefer PublicViewer, which needs no tour id. |
onBackToManager | () => void | Back navigation. The button is hidden when omitted. |
Example
<Viewer
tourId={tourId}
initialScanId={scanId}
onBackToManager={() => navigate(`/tours/${tourId}`)}
/>
isPublic is not an access controlIt only hides the authoring UI. The request still goes out with the current
token, so the tour must be visible to it. To serve anonymous visitors, use
PublicViewer.