AnsweredAssumed Answered

Info Window popup on mouse hover without using graphics

Question asked by geonetadmin on May 24, 2011
Latest reply on May 26, 2011 by geonetadmin
Original User: zorbac

Hi,
My application uses a graphics layer to pop up an info window on mouse over event. This works great as long as there are a limited number of graphics, but as the number of graphics increases (over a thousand now and increasing), it is seriously affecting performance. Performance is degraded both at start-up of app, when graphics are created (I have determined that the slow part is when they are added, one by one to the map), and also whenever the map is refreshed by pan or zoom. My conclusion is that graphics are not very scalable so I need an alternative way to achieve this functionality.

So, can you do this without graphics? I know I can use the identify task for a click event, but I need this to work with a mouse over, not click.

If, as I suspect, this does require graphics or a feature layer (a type of graphic), I'd appreciate any suggestions to improve performance. As I said, graphic layer is used at this time. Would switching to a feature layer have any effect on performance? My other thought is to only add the graphics to the map when they are needed, which is only at large scales, and only when the user has a certain tool selected. I think this would work, but it seems a bit complicated. Testing for current scale and tool is not too hard but keeping track of which graphics have already been added so as not to add them multiple times could be tricky.

The application is built with the 1.5 version api, but I can upgrade to 2.3 or whatever to take advantage of feature layers. I can post some code if helpful, but right now I'm just looking for ideas or possible solutions.

Thanks.

Attachments

Outcomes