async function kmzToGeoJSON(kmz) {
const zip = await JSZip.loadAsync(kmz);
const files = zip.file(/\.kml$/);
const results = {};
for (const file of files) {
const name = file.name.replace('.kml', '');
const str = await file.async('string');
const kml = new DOMParser().parseFromString(str, 'text/xml');
results[name] = toGeoJSON.kml(kml);
}
return results;
}