mirror of
https://github.com/umap-project/umap.git
synced 2025-04-29 03:42:37 +02:00
parent
7f3149af08
commit
16ab193b5d
1 changed files with 8 additions and 1 deletions
|
@ -933,7 +933,14 @@ U.DataLayer = L.Evented.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
rawToGeoJSON: function (c, type, callback) {
|
rawToGeoJSON: function (c, type, callback) {
|
||||||
const toDom = (x) => new DOMParser().parseFromString(x, 'text/xml')
|
const toDom = (x) => {
|
||||||
|
const doc = new DOMParser().parseFromString(x, 'text/xml')
|
||||||
|
const errorNode = doc.querySelector('parsererror')
|
||||||
|
if (errorNode) {
|
||||||
|
this.map.alert.open({ content: L._('Cannot parse data'), level: 'error' })
|
||||||
|
}
|
||||||
|
return doc
|
||||||
|
}
|
||||||
|
|
||||||
// TODO add a duck typing guessType
|
// TODO add a duck typing guessType
|
||||||
if (type === 'csv') {
|
if (type === 'csv') {
|
||||||
|
|
Loading…
Reference in a new issue