None of this actually works because KML is XML and this function ends up treating it as JSON. Replace `createOnLoadCallback` with the below two functions and everything will work.

```
    function parseXML(xmlString) {
        var parser = new DOMParser();
        return parser.parseFromString(xmlString, "text/xml");
    }

    function createOnLoadCallback(viewer, source) {
        var DataSource;
        var parseFunction = JSON.parse;
        var sourceUpperCase = source.toUpperCase();
        if (endsWith(sourceUpperCase, ".CZML")) {
            DataSource = CzmlDataSource;
        } else if (endsWith(sourceUpperCase, ".GEOJSON") || //
        endsWith(sourceUpperCase, ".JSON") || //
        endsWith(sourceUpperCase, ".TOPOJSON")) {
            DataSource = GeoJsonDataSource;
        } else if (endsWith(sourceUpperCase, ".KML")) {
            DataSource = KmlDataSource;
            parseFunction = parseXML;
        } else {
            viewer.onDropError.raiseEvent(viewer, source, 'Unrecognized file extension: ' + source);
            return undefined;
        }

        return function(evt) {
            var dataSource = new DataSource();
            try {
                when(dataSource.load(parseFunction(evt.target.result), source), function() {
                    viewer.dataSources.add(dataSource);
                }, function(error) {
                    viewer.onDropError.raiseEvent(viewer, source, error);
                });
            } catch (error) {
                viewer.onDropError.raiseEvent(viewer, source, error);
            }
        };
    }
```