From e8ddafa388b75c742e6df55f34d796cefbf531ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre-=C3=89tienne=20Lord?= <7397743+pelord@users.noreply.github.com> Date: Wed, 24 Apr 2019 12:23:41 -0400 Subject: [PATCH] feat(wms): Provide title to grouped layers (comma) * feat(wms) Provide title to grouped layers (comma) * refactor(layer-legend) based on reviews * refactor(layer-legend) based on reviews * refactor(layer-legend) code cleanup * refactor(layer-legend) based on reviews * refactor(layer-legend) based on reviews --- .../datasources/wms-datasource.interface.ts | 9 ++++++++ .../layer-legend/layer-legend.component.html | 2 +- .../layer-legend/layer-legend.component.ts | 21 ++++++++++++++++--- 3 files changed, 28 insertions(+), 4 deletions(-) diff --git a/packages/geo/src/lib/datasource/shared/datasources/wms-datasource.interface.ts b/packages/geo/src/lib/datasource/shared/datasources/wms-datasource.interface.ts index 7f6678045d..0cbd6dd7d9 100644 --- a/packages/geo/src/lib/datasource/shared/datasources/wms-datasource.interface.ts +++ b/packages/geo/src/lib/datasource/shared/datasources/wms-datasource.interface.ts @@ -2,6 +2,7 @@ import olSourceImageWMS from 'ol/source/ImageWMS'; import { DataSourceOptions } from './datasource.interface'; import { WFSDataSourceOptionsParams } from './wfs-datasource.interface'; +import { MetadataOptions } from '../../../metadata/shared/metadata.interface'; export interface WMSDataSourceOptions extends DataSourceOptions { // type?: 'wms'; @@ -16,6 +17,7 @@ export interface WMSDataSourceOptions extends DataSourceOptions { ratio?: number; ol?: olSourceImageWMS; refreshIntervalSec?: number; + _layerOptionsFromCapabilities?: WMSLayerOptionsFromCapabilities; } export interface WMSDataSourceOptionsParams { @@ -23,3 +25,10 @@ export interface WMSDataSourceOptionsParams { version?: string; time?: string; } + +export interface WMSLayerOptionsFromCapabilities { + title?: string; + minResolution?: number; + maxResolution?: string; + metadata?: MetadataOptions; +} diff --git a/packages/geo/src/lib/layer/layer-legend/layer-legend.component.html b/packages/geo/src/lib/layer/layer-legend/layer-legend.component.html index 6469098d6e..c609b54854 100644 --- a/packages/geo/src/lib/layer/layer-legend/layer-legend.component.html +++ b/packages/geo/src/lib/layer/layer-legend/layer-legend.component.html @@ -10,7 +10,7 @@ [target]="legend" [collapsed]="false"> -