mirror of
https://github.com/umap-project/umap.git
synced 2025-04-29 03:42:37 +02:00
wip: use new alert API after rebase
This commit is contained in:
parent
e9f9c30639
commit
ca16e5b2c9
3 changed files with 5 additions and 7 deletions
|
@ -235,7 +235,7 @@ export default class Importer {
|
|||
this.map.importFromUrl(this.url, this.format)
|
||||
}
|
||||
} catch (e) {
|
||||
this.map.alert.open({ content: translate('Invalid umap data'), level: 'error' })
|
||||
Alert.error(translate('Invalid umap data'))
|
||||
console.error(e)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ import { DomUtil, DomEvent } from '../../../vendors/leaflet/leaflet-src.esm.js'
|
|||
import { BaseAjax, SingleMixin } from '../autocomplete.js'
|
||||
import { translate } from '../i18n.js'
|
||||
import * as Utils from '../utils.js'
|
||||
import { uMapAlert as Alert } from '../../components/alerts/alert.js'
|
||||
|
||||
const BOUNDARY_TYPES = {
|
||||
admin_6: 'département',
|
||||
|
@ -76,9 +77,7 @@ export class Importer {
|
|||
})
|
||||
const confirm = () => {
|
||||
if (!boundary || !select.value) {
|
||||
this.map.alert.open({
|
||||
content: translate('Please choose a theme and a boundary first.'),
|
||||
})
|
||||
Alert.error(translate('Please choose a theme and a boundary first.'))
|
||||
return
|
||||
}
|
||||
importer.url = `${this.baseUrl}/data/${select.value}/${boundary}?format=geojson&aspoint=${asPoint.checked}`
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import { DomUtil } from '../../../vendors/leaflet/leaflet-src.esm.js'
|
||||
import { BaseAjax, SingleMixin } from '../autocomplete.js'
|
||||
import { translate } from '../i18n.js'
|
||||
import { uMapAlert as Alert } from '../../components/alerts/alert.js'
|
||||
|
||||
const TEMPLATE = `
|
||||
<h3>Overpass</h3>
|
||||
|
@ -60,9 +61,7 @@ export class Importer {
|
|||
const confirm = () => {
|
||||
let tags = container.querySelector('[name=tags]').value
|
||||
if (!tags) {
|
||||
this.map.alert.open({
|
||||
content: translate('Please define an expression for the query first'),
|
||||
})
|
||||
Alert.error(translate('Please define an expression for the query first'))
|
||||
return
|
||||
}
|
||||
const outMode = container.querySelector('[name=out-mode]').value
|
||||
|
|
Loading…
Reference in a new issue