I am using this sample Feature layer hover | ArcGIS API for JavaScript I have modified it to work with a points layer. I was curious if anyone had a suggestion on clearing the dialog after cursor moves off the point. The dialog box seems to not disappear I have tried making the points bigger without much success. I wanted to use an info template however I hit a road block with the mouse click event when trying to incorporate it into my bigger application that uses the closest facility sample. Attached is sample code that pulls in a point feature service.
Thanks,
Hi Craig,
The sample you mentioned is using graphics to show the tooltip dialog. In your example, you are using a Feature Layer. So, you will just need to update the map's 'load' event to call the feature layer's 'mouse-out' event. Ex:
map.on("load", function(){ FarmerMarket.on("mouse-out", closeDialog); });
That sample does have a bug, though. If you move the cursor though the InfoWindow into another county, the previous county stays highlighted.
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.