1

I created this JSFiddle for an example.

Currently, a user needs to click on the graphic point to see the attribute. How can I make it so the user only needs to hover over the graphic for the popup to open?

GforGIS
3,3954 gold badges23 silver badges40 bronze badges
asked Aug 24, 2014 at 23:01

1 Answer 1

3

Add the graphics to a graphicsLayer, and listen for this layer's mouse-over event to detect when the hover starts. Listen for the mouse-out event to detect when the user's mouse has left the graphic (in which case you may want to close the infoWindow).

There's a sample here which demonstrates this, albeit in a slightly more complicated manner.

answered Aug 24, 2014 at 23:20
3
  • 1
    Thanks, the graphicsLayer is exactly what I needed. I hate how ESRI wants everyone to use the AMD module, but so many of their samples are still using the legacy module. Commented Aug 24, 2014 at 23:48
  • 1
    we're chipping away at migrating them all to AMD, but there are a LOT of samples. any one in particular you'd like to see upgraded? Commented Aug 28, 2014 at 16:16
  • @JohnGravois I know you you guys are. I was just venting. Thanks for asking that's nice of you. Commented Sep 5, 2014 at 5:51

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.