main.cesium.KmlTour.kt Maven / Gradle / Ivy
// Automatically generated - do not modify!
@file:Suppress(
"EXTERNAL_CLASS_CONSTRUCTOR_PROPERTY_PARAMETER",
)
package cesium
/**
* Describes a KmlTour, which uses KmlTourFlyTo, and KmlTourWait to
* guide the camera to a specified destinations on given time intervals.
* @see Online Documentation
*
* @constructor
* @property [name] name parsed from KML
* @property [id] id parsed from KML
* @property [playlist] array with KmlTourFlyTos and KmlTourWaits
* @see Online Documentation
*/
@JsName("\$cesium__KmlTour")
external class KmlTour(
var name: String,
var id: String,
var playlist: Array,
) {
/**
* Index of current entry from playlist
* @see Online Documentation
*/
var playlistIndex: Int
/**
* Event will be called when tour starts to play,
* before any playlist entry starts to play.
* @see Online Documentation
*/
var tourStart: Event
/**
* 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.
* @see Online Documentation
*/
var tourEnd: Event
/**
* Event will be called when entry from playlist starts to play.
*
* Event callback will be called with curent entry as first parameter.
* @see Online Documentation
*/
var entryStart: Event
/**
* 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]
* @see Online Documentation
*/
var entryEnd: Event
/**
* Add entry to this tour playlist.
* @param [entry] an entry to add to the playlist.
* @see Online Documentation
*/
fun addPlaylistEntry(entry: KmlTourFlyTo)
fun addPlaylistEntry(entry: KmlTourWait)
/**
* Play this tour.
* @param [viewer] viewer widget.
* @param [cameraOptions] these options will be merged with [Camera.flyTo]
* options for FlyTo playlist entries.
* @see Online Documentation
*/
fun play(
viewer: Viewer,
cameraOptions: Any? = definedExternally,
)
/**
* Stop curently playing tour.
* @see Online Documentation
*/
fun stop()
}