viewerDynamicObjectMixin

viewerDynamicObjectMixin

A mixin which adds behavior to the Viewer widget for dealing with DynamicObject instances. This allows for DynamicObjects to be tracked with the camera, either by the viewer clicking on them, or by setting the trackedObject property. Rather than being called directly, this function is normally passed as a parameter to Viewer#extend, as shown in the example below.

Parameters:
Name Type Description
viewer Viewer The viewer instance.
Throws:
Example
// Add support for working with DynamicObject instances to the Viewer.
var dynamicObject = ... //A Cesium.DynamicObject instance
var viewer = new Cesium.Viewer('cesiumContainer');
viewer.extend(Cesium.viewerDynamicObjectMixin);
viewer.trackedObject = dynamicObject; //Camera will now track dynamicObject
Source:

Members

:Event

Gets an event that will be raised when an object is tracked by the camera. The event has two parameters: a reference to the viewer instance, and the newly tracked object.

:DynamicObject

Gets or sets the DynamicObject instance currently being tracked by the camera.