How to show popup in ESRI map on mouse hover

1078
3
10-12-2021 04:39 AM
RishavPathak
New Contributor II

Hi,

I want to show popup in ESRI map on mouse hover. Currently I am using Arcgis Javascrip API 4.19. 

Is it possible to implement such features without using dojo?

If yes then can someone guide me on how to do it?

 

Thanks

3 Replies
KenBuja
MVP Esteemed Contributor
0 Kudos
woriginal1
New Contributor II

I think this sample code is what you're looking for: https://developers.arcgis.com/javascript/latest/sample-code/view-hittest/

0 Kudos
GavinRehkemper
Esri Contributor

That view hitTest sample from @woriginal1  is probably the best resource. Here is an additional sample that uses the "pointer-move" event along with hitTest and a debounce to create a popup on mouse hover: https://codepen.io/gavinr/pen/WNEwKEq?editors=0010