Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
up vote 7 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.