Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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
add comment

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
add comment

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
add comment

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.