# KmlTour

#### new Cesium.KmlTour(name, id, playlist)
DataSources/KmlTour.js 16

Name | Type | Description
--- | --- | ---
`name` | String | name parsed from KML
`id` | String | id parsed from KML
`playlist` | Array | array with KMLTourFlyTos, KMLTourWaits and KMLTourSoundCues

### Members

#### entryEnd : Event
DataSources/KmlTour.js 67

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
DataSources/KmlTour.js 58

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

#### id : String
DataSources/KmlTour.js 21

Id of kml gx:Tour entry

#### name : String
DataSources/KmlTour.js 26

Tour name

#### playlist : Array
DataSources/KmlTour.js 36

Array of playlist entries

#### playlistIndex : Number
DataSources/KmlTour.js 31

Index of current entry from playlist

#### tourEnd : Event
DataSources/KmlTour.js 51

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
DataSources/KmlTour.js 42

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

### Methods

#### addPlaylistEntry(entry)
DataSources/KmlTour.js 77

Add entry to this tour playlist.

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

#### play(viewer, cameraOptions)
DataSources/KmlTour.js 88

Play this tour.

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

#### stop()
DataSources/KmlTour.js 105

Stop curently playing tour.