Skip to main content

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

PropTypeDescription
tourId (required)stringTour to open.
initialScanIdstringPanorama to open on. Defaults to the tour's defaultScanId.
isPublicbooleanHides every authoring control. Defaults to false. For anonymous visitors prefer PublicViewer, which needs no tour id.
onBackToManager() => voidBack navigation. The button is hidden when omitted.

Example

<Viewer
tourId={tourId}
initialScanId={scanId}
onBackToManager={() => navigate(`/tours/${tourId}`)}
/>
isPublic is not an access control

It 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.