Hi, So I had previously 4.30 and everything was working well.
Upon 4.31 upgrade, When initialize a session, I have a function that upon hovering on either FeatureLayer or StreamLayer, opens a popup via MapView.popup.open() and close it via popup.close().
however, I receive the following error:
mapView?.popup?.open is not a function
mapView.popup.close is not a function
Now, When I click on anywhere on the map (even blank spots), these functions suddenly become available, and everything works.
Solved! Go to Solution.
Because the Popup is now lazily loaded, it's not a full Popup instance until a feature with a popup template is clicked.
To interact with the popup manually, there are two methods on the view you an use.
https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#openPopup
https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#closePopup
This should get you the behavior you are looking for.
Because the Popup is now lazily loaded, it's not a full Popup instance until a feature with a popup template is clicked.
To interact with the popup manually, there are two methods on the view you an use.
https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#openPopup
https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#closePopup
This should get you the behavior you are looking for.