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
| Prop | Type | Description |
|---|---|---|
tourId (required) | string | Tour to manage. |
onBack | () => void | Back navigation. The button is hidden when omitted. |
onStartTour | (scanId: string | null) => void | Fires 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 | () => void | Fires after the tour is deleted. Navigate away from this screen. |
publicURLForSlug | (slug: string) => string | Builds 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.