Skip to content

Embedding One Tour

Embedding a single tour in a web page is easy. The two lines of code below are all that's needed to embed the tour that follows.

<script type="module" id="ma-23820" src="https://tour.mapsalive.com/23820/mapsalive-module.js"></script>
<div class="ma-23820"></div>

Using the API

There are no special API considerations for using the API when embedding a single tour in a web page. That's because when there is only one tour, there is only one API object. There is no question as to which API object handles calls from the tour or which tour will receive callbacks from the API object. As such, the tour can make calls to the API object and receive API callbacks, without specifying which tour is doing the calling or is called back.

Below are examples of a call to the API and a callback function

API call

api.runSlideShow(2000);

Callback function

onEventPageLoaded(event) { ... }