W3cubDocs

/OpenLayers

ol/interaction/DragAndDrop


Classes

DragAndDropEvent
DragAndDrop

Type Definitions

Options{Object}

Properties:
Name Type Description
formatConstructors Array.<(Class.<module:ol/format/Feature~FeatureFormat>|module:ol/format/Feature~FeatureFormat)> | undefined

Format constructors (and/or formats pre-constructed with options).

source VectorSource | undefined

Optional vector source where features will be added. If a source is provided all existing features will be removed and new features will be added when they are dropped on the target. If you want to add features to a vector source without removing the existing features (append only), instead of providing the source option listen for the "addfeatures" event.

projection ProjectionLike | undefined

Target projection. By default, the map's view's projection is used.

target HTMLElement | undefined

The element that is used as the drop target, default is the viewport element.

© 2005-present, OpenLayers Contributors All rights reserved.Licensed under the BSD 2-Clause License.
https://openlayers.org/en/latest/apidoc/module-ol_interaction_DragAndDrop.html