Class: DropFile

ol.interaction. DropFile

Extend DragAndDrop choose drop zone + fires loadstart, loadend


new DropFile(options)

Parameters:
Name Type Description
options *
Properties
Name Type Description
zone string

selector for the drop zone, default document

formatConstructors Array.<function(new:ol.format.Feature)> | undefined

Format constructors, default [ ol.format.GPX, ol.format.GeoJSONX, ol.format.GeoJSONP, ol.format.GeoJSON, ol.format.IGC, ol.format.KML, ol.format.TopoJSON ]

accept Array.<string> | undefined

list of accepted format, default ["gpx","json","geojsonx","geojsonp","geojson","igc","kml","topojson"]

Fires:
  • loadstart, loadend,event: addfeatures

Extends

  • ol.interaction.Interaction

Methods


ondrop()

Do something when over


onstop()

Do something when over


setMap()

Set the map