Skip to content

Commit 0ee658f

Browse files
feat: adjusting layer properties #264
1 parent 4b9dbbb commit 0ee658f

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

  • projects/services-layers/src/lib/types

projects/services-layers/src/lib/types/Layers.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ export interface ILayerExpanded {
160160
expanded?: boolean;
161161
}
162162

163-
export interface ILayerOptions {
163+
export interface ILayerOptions<T = any > {
164164
name: string;
165165
id: string;
166166
// id: string
@@ -174,7 +174,7 @@ export interface ILayerOptions {
174174
attribution?: string;
175175
displayName?: string;
176176
description?: string | IDynamicComponent;
177-
properties?: IAnyObject;
177+
properties?: T;
178178
time?: string;
179179
minResolution?: number;
180180
maxResolution?: number;
@@ -300,7 +300,7 @@ export interface IStackedLayerOptions extends Omit<ILayerOptions, 'type'> {
300300
/**
301301
* Classes for layer construction
302302
*/
303-
export class Layer implements ILayerOptions {
303+
export class Layer<T = any> implements ILayerOptions<T>{
304304
name = '';
305305
id = '';
306306
type: TLayertype;
@@ -313,7 +313,7 @@ export class Layer implements ILayerOptions {
313313
attribution?: string;
314314
displayName?: string;
315315
description?: string | IDynamicComponent;
316-
properties?: IAnyObject;
316+
properties?: T = {} as T;
317317
protected protTime?: string;
318318
minResolution?: number;
319319
maxResolution?: number;

0 commit comments

Comments
 (0)