diff --git a/src/model/Layer.ts b/src/model/Layer.ts index 19b5ada7c..18b5eeeeb 100644 --- a/src/model/Layer.ts +++ b/src/model/Layer.ts @@ -25,6 +25,11 @@ export interface DefaultLayerPropertyConfig { visible?: boolean; } +export interface DownloadConfig { + downloadUrl: string; + formatName: string; +} + export interface DefaultLayerClientConfig { minResolution?: number; maxResolution?: number; @@ -33,6 +38,7 @@ export interface DefaultLayerClientConfig { propertyConfig?: DefaultLayerPropertyConfig[]; crossOrigin?: string; opacity?: number; + downloadConfig?: DownloadConfig[]; } export interface LayerArgs extends BaseEntityArgs { diff --git a/src/parser/SHOGunApplicationUtil.spec.ts b/src/parser/SHOGunApplicationUtil.spec.ts index d2de50147..62d1041a5 100644 --- a/src/parser/SHOGunApplicationUtil.spec.ts +++ b/src/parser/SHOGunApplicationUtil.spec.ts @@ -135,6 +135,10 @@ describe('SHOGunApplicationUtil', () => { displayName: 'id', visible: true }], + downloadConfig: [{ + downloadUrl: 'https://example.com/geo/ows?request=GetFeature&outputFormat=application%2Fjson', + formatName: 'GeoJSON' + }], searchable: true }, sourceConfig: { @@ -174,6 +178,7 @@ describe('SHOGunApplicationUtil', () => { expected.set('type', myLayer.type); expected.set('searchable', myLayer.clientConfig?.searchable); expected.set('propertyConfig', myLayer.clientConfig?.propertyConfig); + expected.set('downloadConfig', myLayer.clientConfig?.downloadConfig); expected.set('legendUrl', myLayer.sourceConfig.legendUrl); expected.set('hoverable', myLayer.clientConfig?.hoverable); diff --git a/src/parser/SHOGunApplicationUtil.ts b/src/parser/SHOGunApplicationUtil.ts index 38f91f2b9..08b643c95 100644 --- a/src/parser/SHOGunApplicationUtil.ts +++ b/src/parser/SHOGunApplicationUtil.ts @@ -473,6 +473,7 @@ class SHOGunApplicationUtil { olLayer.set('type', layer.type); olLayer.set('searchable', layer.clientConfig?.searchable); olLayer.set('propertyConfig', layer.clientConfig?.propertyConfig); + olLayer.set('downloadConfig', layer.clientConfig?.downloadConfig); olLayer.set('legendUrl', layer.sourceConfig.legendUrl); olLayer.set('hoverable', layer.clientConfig?.hoverable); olLayer.set('useBearerToken', layer.sourceConfig?.useBearerToken);