add workspace url load backward compatibility with .km files
This commit is contained in:
parent
73b5d9abae
commit
c27283de01
1 changed files with 3 additions and 2 deletions
|
|
@ -592,8 +592,9 @@ function settingsImport(data, ask) {
|
|||
}
|
||||
|
||||
function settingsImportUrl(url, ask) {
|
||||
fetch(url).then(r => r.arrayBuffer()).then(a => {
|
||||
settingsImportZip(a, ask);
|
||||
const kmz = url.endsWith(".kmz");
|
||||
fetch(url).then(r => kmz ? r.arrayBuffer() : r.text()).then(a => {
|
||||
kmz ? settingsImportZip(a, ask) : settingsImport(a, ask);
|
||||
}).catch(error => {
|
||||
console.log({workspace_url: url, error: error.message || error});
|
||||
api.show.alert('workspace load failed');
|
||||
|
|
|
|||
Loading…
Reference in a new issue