AnsweredAssumed Answered

Change color and width of Polyline

Question asked by rjulich on Apr 4, 2013
Latest reply on Apr 4, 2013 by rjulich
I would like it so that when a user mousesover a polyline on a map, it changes color and width. I have a map with 11 polylines on my map. Some on those polylines are connected so a user can't really see which line segment they are selecting. The polylines are all on a layer called reaches. I have the "listener" functions that correctly detect when a polyline in the reach layer has a mouse on it or when a mouse goes off of it:

dojo.connect(reaches, "onMouseOver", function(evt)
{
    
});
dojo.connect(reaches, "onMouseOut", function()
{
    
});

The problem is that with these functions is that they don't know which line is being selected. My other problem is - how do I change the color and width of the polyline? I know that I can define a new line and just display it over the top, but I think I should be able to just change the properties of the existing line.

Outcomes