Skip to main content

TourManager

One tour's floors, rooms and scans, with editing: rename, set the default scan, upload thumbnails and floor plans, and switch the tour between public and private. Reads through tours.get(id).

Props

PropTypeDescription
tourId (required)stringTour to manage.
onBack() => voidBack navigation. The button is hidden when omitted.
onStartTour(scanId: string | null) => voidFires when the user opens the viewer — from the Start Tour button, or by clicking a specific panorama. Route to your viewer screen with the given scan.
onDeleted() => voidFires after the tour is deleted. Navigate away from this screen.
publicURLForSlug(slug: string) => stringBuilds the shareable link for a public tour. The SDK knows the slug but not your routes, so the copy-link button stays hidden until you supply this.

Example

<TourManager
tourId={tourId}
onBack={() => navigate("/tours")}
onDeleted={() => navigate("/tours")}
onStartTour={scanId => navigate(`/tours/${tourId}/view?scan=${scanId ?? ""}`)}
publicURLForSlug={slug => `https://example.com/t/${slug}`}
/>
Sharing a public tour

publicURLForSlug should point at whatever route renders PublicViewer. Making the tour private again revokes the slug, and links built from it stop resolving.