flyTo

suspend fun flyTo(target: Entity, options: Viewer.FlyToOptions? = definedExternally): Boolean(source)

Flies the camera to the provided entity, entities, or data source. If the data source is still in the process of loading or the visualization is otherwise still loading, this method waits for the data to be ready before performing the flight.

The offset is heading/pitch/range in the local east-north-up reference frame centered at the center of the bounding sphere. The heading and the pitch angles are defined in the local east-north-up reference frame. The heading is the angle from y axis and increasing towards the x axis. Pitch is the rotation from the xy-plane. Positive pitch angles are above the plane. Negative pitch angles are below the plane. The range is the distance from the center. If the range is zero, a range will be computed such that the whole bounding sphere is visible.

In 2D, there must be a top down view. The camera will be placed above the target looking down. The height above the target will be the range. The heading will be determined from the offset. If the heading cannot be determined from the offset, the heading will be north.

Return

A Promise that resolves to true if the flight was successful or false if the target is not currently visualized in the scene or the flight was cancelled. //TODO: Cleanup entity mentions

Parameters

target

The entity, array of entities, entity collection, data source, Cesium3DTileset, point cloud, or imagery layer to view. You can also pass a promise that resolves to one of the previously mentioned types.

See also


suspend fun flyTo(target: ReadonlyArray<Entity>, options: Viewer.FlyToOptions? = definedExternally): Boolean(source)
suspend fun flyTo(target: EntityCollection, options: Viewer.FlyToOptions? = definedExternally): Boolean(source)
suspend fun flyTo(target: DataSource, options: Viewer.FlyToOptions? = definedExternally): Boolean(source)
suspend fun flyTo(target: ImageryLayer, options: Viewer.FlyToOptions? = definedExternally): Boolean(source)
suspend fun flyTo(target: Cesium3DTileset, options: Viewer.FlyToOptions? = definedExternally): Boolean(source)
suspend fun flyTo(target: TimeDynamicPointCloud, options: Viewer.FlyToOptions? = definedExternally): Boolean(source)
suspend fun flyTo(target: Promise<Entity>, options: Viewer.FlyToOptions? = definedExternally): Boolean(source)
suspend fun flyTo(target: Promise<ReadonlyArray<Entity>>, options: Viewer.FlyToOptions? = definedExternally): Boolean(source)
suspend fun flyTo(target: Promise<EntityCollection>, options: Viewer.FlyToOptions? = definedExternally): Boolean(source)
suspend fun flyTo(target: Promise<DataSource>, options: Viewer.FlyToOptions? = definedExternally): Boolean(source)
suspend fun flyTo(target: Promise<ImageryLayer>, options: Viewer.FlyToOptions? = definedExternally): Boolean(source)
suspend fun flyTo(target: Promise<Cesium3DTileset>, options: Viewer.FlyToOptions? = definedExternally): Boolean(source)
suspend fun flyTo(target: Promise<TimeDynamicPointCloud>, options: Viewer.FlyToOptions? = definedExternally): Boolean(source)
suspend fun flyTo(target: Promise<VoxelPrimitive>, options: Viewer.FlyToOptions? = definedExternally): Boolean(source)