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.
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
viewer.selectedObject = object; //Selection will now appear over object