Skip to content

Commit

Permalink
fix(layer): define a layer id in json context
Browse files Browse the repository at this point in the history
  • Loading branch information
mbarbeau committed Dec 6, 2017
1 parent 8c4e72b commit f915ff9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/lib/layer/shared/layers/layer.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export interface LayerOptions extends olx.layer.BaseOptions {
visible?: boolean;
view?: olx.layer.BaseOptions;
baseLayer?: boolean;
id?: string;
}

export interface LayerContext extends LayerOptions {}
Expand Down
2 changes: 1 addition & 1 deletion src/lib/layer/shared/layers/layer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export abstract class Layer {
public status$: Subject<SubjectStatus>;

get id(): string {
return this.dataSource.id;
return this.options.id || this.dataSource.id;
}

get title(): string {
Expand Down

0 comments on commit f915ff9

Please sign in to comment.