0

I am using open layer map toggle for open and close but when I was opening the toggle with in macro seconds it is coming to normal position. I want it to stay there un till we click on close

I have debugged and find that it happening with HostListerner when I was commented it is working fine but it is impacting on responsive screen so please help to fix this issue added the code below for reference when I was commented this it is working fine Also adding controls for Open layer map library code.

@HostListener('window: resize', ['$event.target'])
public onResize(target) {
    this.changeSize.next(target.innerWidth);
}


if (this.canFullScreen && !this.hideControls) {
    controls.push(new FullScreen({ source: this.mapWrap.nativeElement as HTMLElement , tipLabel: this.translate.instant("SiteView.button_fullScreen_tooltip")}));
}

for (const control of controls) {
    console.log(control);
    this.olMap.addControl(control);
}
Hardik Solanki
  • 3,153
  • 1
  • 17
  • 28
venu dev
  • 21
  • 2

0 Answers0