{
function readFile(event) {
const inputElement = event.target;
const inputFile = inputElement.files[0];
var reader = new FileReader();
reader.onload = function (loadedEvent) {
const parsedResult = togeojson.gpx(
new DOMParser().parseFromString(inputFile, "text/xml")
);
mutable localFileContent = json_data;
};
reader.readAsText(inputFile);
}
return (window.readFile = readFile);
}