JS API 3.7 layer mouse-out event not firing when changing symbols

992
1
10-03-2013 01:50 PM
AlexNguyen1
New Contributor II
In API 3.7, my FeatureLayer "mouse-out" events are not firing when I change symbol via setSymbol().

I have a FeatureLayer and when I mouse-over a line, I want it to highlight that line, then when I mouse out, I reset it back to the previous symbol.  In API 3.6, it worked for me, but in 3.7 it seems to break.

Please see this JSFiddle:  http://jsfiddle.net/alexng99/FSfzQ/.  My lines are not turning back to previous symbols because mouse-out is not fired.

I forked my JSFiddle to use API 3.6 and everything works as expected.  See working example in 3.6: http://jsfiddle.net/alexng99/ZgpdU/

I'd like to use version 3.7, but this bug is breaking my code.  What can I do to work around this?
0 Kudos
1 Reply
MattLane
Occasional Contributor II
Oddly enough, in their 3.7 api mouse event example, they attach the mouse-out to the map.graphics and the mouse-over to the layer. Maybe they are already aware of the issue. Instead of changing the renderer of the graphic, you could try adding a graphic like the example, and then clearing it.
http://developers.arcgis.com/en/javascript/sandbox/sandbox.html?sample=fl_hover
0 Kudos