API Example: Tours

Try it out:

Activate a tour step by entering a tour step index in the box below and clicking the “Activate” button.

The setTourStep() function also allows for specifying the tour index (for the purposes of this demo we have hard coded it to 0), and an optional ‘interpolate’ flag to indicate if the viewer should animate or jump directly to the next scene state (defaults to ‘True’).

How it works:

See the annotated javascript from this page below for how to use the setTourStep() function.

function setTourStep(stepIdx) {
	// Get reference to the Explorer element by id
	var voyagerElement = document.getElementById("voyager");
	// Call the setTourStep function with the value of the 
	// option input element as the parameter.
	// **Note the hard-coded tour index and interpolate flag.
	voyagerElement.setTourStep(0, stepIdx.value, true);