viewerDragDropMixin

external fun viewerDragDropMixin(viewer: Viewer, options: ViewerDragDropMixinOptions? = definedExternally)(source)

A mixin which adds default drag and drop support for CZML files to the Viewer widget. Rather than being called directly, this function is normally passed as a parameter to Viewer.extend, as shown in the example below.

// Add basic drag and drop support and pop up an alert window on error.
const viewer = new Viewer('cesiumContainer');
viewer.extend(viewerDragDropMixin);
viewer.dropError.addEventListener(function(viewerArg, source, error) {
window.alert('Error processing ' + source + ':' + error);
});

Parameters

viewer

The viewer instance.

See also