mirror of
https://github.com/umap-project/umap.git
synced 2025-04-29 03:42:37 +02:00
fix: importer.map is undefined
Broken this the map split I guess.
This commit is contained in:
parent
e01a526935
commit
8fa26a02a2
1 changed files with 3 additions and 3 deletions
|
@ -37,8 +37,8 @@ class Autocomplete extends SingleMixin(BaseAjax) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export class Importer {
|
export class Importer {
|
||||||
constructor(map, options = {}) {
|
constructor(umap, options = {}) {
|
||||||
this.map = map
|
this.umap = umap
|
||||||
this.name = options.name || 'GeoDataMine'
|
this.name = options.name || 'GeoDataMine'
|
||||||
this.baseUrl = options?.url || 'https://geodatamine.fr'
|
this.baseUrl = options?.url || 'https://geodatamine.fr'
|
||||||
this.id = 'geodatamine'
|
this.id = 'geodatamine'
|
||||||
|
@ -49,7 +49,7 @@ export class Importer {
|
||||||
let boundaryName = null
|
let boundaryName = null
|
||||||
const container = DomUtil.create('div')
|
const container = DomUtil.create('div')
|
||||||
container.innerHTML = TEMPLATE
|
container.innerHTML = TEMPLATE
|
||||||
const response = await importer.map.request.get(`${this.baseUrl}/themes`)
|
const response = await this.umap.request.get(`${this.baseUrl}/themes`)
|
||||||
const select = container.querySelector('select')
|
const select = container.querySelector('select')
|
||||||
if (response?.ok) {
|
if (response?.ok) {
|
||||||
const { themes } = await response.json()
|
const { themes } = await response.json()
|
||||||
|
|
Loading…
Reference in a new issue