1

How to reset the mapView if there is a dynamic content to be showed in the snazzy window popup?

When we open the snazzywindow modal on click of the marker it populates with details, for the first time the map view doesn't set properly to the complete view of the modal but when we open for the second time the map view adjusts to the full view of the popup

stackblitz URL of the problem: https://angular-tst926.stackblitz.io/

stackblitz code: https://stackblitz.com/edit/angular-tst926

Upon launching of the stackblitz url, click on one of the marker which is closer to the top of the browser, the intial popup will not have the content but after second based on the mock response the Modal populates with the right content but the full view of the modal is blocked, but when click once again on the marker to open the window it readjusts to the full view

based on the response of the API, the calculated content would be pasted on to the modal popup and subsequently the map view should readjust to show the full modal content at first time itself instead of clicking on the marker once again

**refer to the stackblitz: https://stackblitz.com/edit/angular-tst926 for the angular version and dependent versions **

4

1 回答 1

0

这是工作的stackblitz:https ://stackblitz.com/edit/angular-grmaew

需要的是以下内容:

  1. 您需要使用panOnOpenagm-snazzy-info-window
  2. usePanning在 agm 地图上
  3. triggerResize(true)更新地图上的 lat 和 lng 后调用
于 2019-08-02T17:27:53.807 回答