How to trigger multiple GraphicsLayer OnClick() with overlapping images?

650
2
02-07-2012 08:30 AM
MarcusC
New Contributor
ESRI newbie here...

I have map images that overlap sometimes. These overlapping images could be on the same graphics layer and/or different graphic layers. On the click event, I only get the top image graphic. I need a list of all the graphics behind a click event, same graphic layer or not.

How do I do that?

Thanks,

Marcus
0 Kudos
2 Replies
derekswingley1
Frequent Contributor
Here's the approach I would take:  when your map is clicked, use the method outlined in a previous server blog post to filter graphics. That means building an extent around your click point and then checking if graphics intersect it. This is applicable to one or many graphics layers�?? it's up to you. For one graphics layer, one dojo.filter statement will get the job done. For more than one, you would use a dojo.filter for each graphics layer and then combine the results.
0 Kudos
MarcusC
New Contributor
I'm on it. Thank you!
0 Kudos