Skip to content

Commit

Permalink
fix: minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jenniferarnesen committed Aug 31, 2023
1 parent 74d575c commit 3b5c6fa
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/util/getDefaultLayerTypes.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import i18n from '@dhis2/d2-i18n'
import { earthEngineLayers } from '../constants/earthEngine.js'
import {
THEMATIC_LAYER,
EVENT_LAYER,
TRACKED_ENTITY_LAYER,
FACILITY_LAYER,
ORG_UNIT_LAYER,
THEMATIC_LAYER,
TRACKED_ENTITY_LAYER,
} from '../constants/layers.js'

export const getDefaultLayerTypes = () => [
Expand Down
16 changes: 8 additions & 8 deletions src/util/requests.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,6 @@ const fetchMapQuery = {
},
}

export const fetchExternalLayersQuery = {
resource: 'externalMapLayers',
params: {
fields: 'id,displayName~rename(name),service,url,attribution,mapService,layers,imageFormat,mapLayerPosition,legendSet,legendSetUrl',
paging: false,
},
}

export const fetchMap = async (id, engine, keyDefaultBaseMap) =>
engine
.query(
Expand All @@ -34,6 +26,14 @@ export const fetchMap = async (id, engine, keyDefaultBaseMap) =>
throw new Error(`Could not load map with id "${id}"`)
})

export const fetchExternalLayersQuery = {
resource: 'externalMapLayers',
params: {
fields: 'id,displayName~rename(name),service,url,attribution,mapService,layers,imageFormat,mapLayerPosition,legendSet,legendSetUrl',
paging: false,
},
}

// Fetch a single externalLayer
export const getExternalLayer = async (id) => {
const d2 = await getD2()
Expand Down

0 comments on commit 3b5c6fa

Please sign in to comment.