import { HsLayerDescriptor } from '../layer-descriptor.interface' ; import { Injectable } from '@angular/core' ; import { Subject } from 'rxjs' ; @ Injectable ( { providedIn : 'root' , } ) export class HsLayerSelectorService { layerSelected : Subject < HsLayerDescriptor > = new Subject ( ) ; currentLayer : HsLayerDescriptor ; constructor ( ) { } param hsLayer select ( hsLayer ) { this . currentLayer = hsLayer ; this . layerSelected . next ( hsLayer ) ; } }