Skip to content

Commit

Permalink
Merge commit '2425ec70dee428d08c2d26e302d38781fe80cf55' into 423-add-…
Browse files Browse the repository at this point in the history
…issues-table-component-to-issues-details-page-part-2
  • Loading branch information
GeorgeGoodall committed Oct 11, 2024
2 parents c30f15f + 2425ec7 commit 791df3f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
12 changes: 12 additions & 0 deletions src/assets/js/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ class Map {
interactive: opts.interactive ?? true
})

// Add map controls
this.addControls(opts.interactive)

this.map.on('load', () => {
// Store the first symbol layer id
this.setFirstMapLayerId()
Expand All @@ -49,6 +52,15 @@ class Map {
})
}

addControls (interactive = true) {
this.map.addControl(new maplibregl.ScaleControl(), 'bottom-left')

if (interactive) {
this.map.addControl(new maplibregl.NavigationControl())
this.map.addControl(new maplibregl.FullscreenControl())
}
}

setFirstMapLayerId () {
const layers = this.map.getStyle().layers

Expand Down
4 changes: 2 additions & 2 deletions src/middleware/datasetOverview.middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ const fetchSources = fetchMany({
export const prepareDatasetOverviewTemplateParams = (req, res, next) => {
const { orgInfo, specification, columnSummary, entityCount, sources, dataset, issues } = req

const mappingFields = columnSummary[0].mapping_field?.split(';') ?? []
const nonMappingFields = columnSummary[0].non_mapping_field?.split(';') ?? []
const mappingFields = columnSummary[0]?.mapping_field?.split(';') ?? []
const nonMappingFields = columnSummary[0]?.non_mapping_field?.split(';') ?? []
const allFields = [...mappingFields, ...nonMappingFields]

const numberOfFieldsSupplied = specification.fields.map(field => field.field).reduce((acc, current) => {
Expand Down

0 comments on commit 791df3f

Please sign in to comment.