Example of using the drag-and-drop interaction. Drag and drop KML files on to the map.
See the drag-and-drop.js source to see how this is done.