Skip to content

Commit

Permalink
fix: importer.map is undefined in geodatamine importer (#2332)
Browse files Browse the repository at this point in the history
Broken since the map split I guess.
  • Loading branch information
yohanboniface authored Dec 3, 2024
2 parents 2b2580f + 8fa26a0 commit 6221b70
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions umap/static/umap/js/modules/importers/geodatamine.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ class Autocomplete extends SingleMixin(BaseAjax) {
}

export class Importer {
constructor(map, options = {}) {
this.map = map
constructor(umap, options = {}) {
this.umap = umap
this.name = options.name || 'GeoDataMine'
this.baseUrl = options?.url || 'https://geodatamine.fr'
this.id = 'geodatamine'
Expand All @@ -49,7 +49,7 @@ export class Importer {
let boundaryName = null
const container = DomUtil.create('div')
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')
if (response?.ok) {
const { themes } = await response.json()
Expand Down

0 comments on commit 6221b70

Please sign in to comment.