I want to trigger an event when the user hovers over a geometry that they drew. I know how to set up hover events for DOM objects, but not for graphic elements within the map window.

share|improve this question

2 Answers

up vote 5 down vote accepted

The GraphicsLayer has an onMouseOver event (doc). Not sure if that's what you're looking for.

share|improve this answer

dojo.connect(yourLayer, "onMouseOver", function(evt) { .... map.setMapCursor("pointer"); }

dojo.connect(map.graphics, "onMouseOut", function(evt) { map.graphics.clear(); map.setMapCursor("default");

}

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.