Skip to content

Commit

Permalink
Move initialization to constructor.
Browse files Browse the repository at this point in the history
  • Loading branch information
HarelM committed Jun 13, 2024
1 parent 00d74bf commit cc90adc
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ export class LayersViewComponent extends BaseMapComponent implements OnInit {
type: "FeatureCollection",
features: []
};
this.overlays$ = this.store.select((state: ApplicationState) => state.layersState.overlays);
}

public getBaseLayer() {
Expand All @@ -64,7 +65,6 @@ export class LayersViewComponent extends BaseMapComponent implements OnInit {
this.poiGeoJsonData = this.poiService.poiGeojsonFiltered;
});
this.store.select((state: ApplicationState) => state.poiState.selectedPointOfInterest).pipe(takeUntilDestroyed()).subscribe(poi => this.onSelectedPoiChanged(poi));
this.overlays$ = this.store.select((state: ApplicationState) => state.layersState.overlays);
}

private onSelectedPoiChanged(poi: Immutable<GeoJSON.Feature>) {
Expand Down

0 comments on commit cc90adc

Please sign in to comment.