# KmlTour

#### new Cesium.KmlTour(name, id, playlist)
engine/Source/DataSources/KmlTour.js 20

Describes a KmlTour, which uses KmlTourFlyTo, and KmlTourWait to guide the camera to a specified destinations on given time intervals.

Name | Type | Description
--- | --- | ---
`name` | string | name parsed from KML
`id` | string | id parsed from KML
`playlist` | Array | array with KmlTourFlyTos and KmlTourWaits

##### Demo:

- KML Tours

##### See:

- KmlTourFlyTo
- KmlTourWait

### Members

#### entryEnd : Event
engine/Source/DataSources/KmlTour.js 71

Event will be called when entry from playlist ends to play. Event callback will be called with following parameters: 1. entry - entry 2. terminated - true if playback was terminated by calling `KmlTour#stop`

#### entryStart : Event
engine/Source/DataSources/KmlTour.js 62

Event will be called when entry from playlist starts to play. Event callback will be called with curent entry as first parameter.

#### id : string
engine/Source/DataSources/KmlTour.js 25

Id of kml gx:Tour entry

#### name : string
engine/Source/DataSources/KmlTour.js 30

Tour name

#### playlist : Array
engine/Source/DataSources/KmlTour.js 40

Array of playlist entries

#### playlistIndex : number
engine/Source/DataSources/KmlTour.js 35

Index of current entry from playlist

#### tourEnd : Event
engine/Source/DataSources/KmlTour.js 55

Event will be called when all playlist entries are played, or tour playback being canceled. If tour playback was terminated, event callback will be called with terminated=true parameter.

#### tourStart : Event
engine/Source/DataSources/KmlTour.js 46

Event will be called when tour starts to play, before any playlist entry starts to play.

### Methods

#### addPlaylistEntry(entry)
engine/Source/DataSources/KmlTour.js 81

Add entry to this tour playlist.

Name | Type | Description
--- | --- | ---
`entry` | KmlTourFlyTo | KmlTourWait | an entry to add to the playlist.

#### play(widget, cameraOptions)
engine/Source/DataSources/KmlTour.js 92

Play this tour.

Name | Type | Description
--- | --- | ---
`widget` | Viewer | CesiumWidget | The widget.
`cameraOptions` | object | optional these options will be merged with `Camera#flyTo` options for FlyTo playlist entries.

#### stop()
engine/Source/DataSources/KmlTour.js 119

Stop curently playing tour.

Need help? The fastest way to get answers is from the community and team on the Cesium Forum.