Select to view content in your preferred language

Selecting graphics within a graphics layer rendered by the DictionaryRenderer

2646
4
Jump to solution
09-29-2012 08:35 AM
Labels (1)
MiriRevivo
Deactivated User
Hi,

I have an app that's using the MessageProcessor object to receive military entities as messages, turn them into graphics and add them to the MessageGroupLayer graphics layers group. I need to implement selections on those graphics, but since they're rendered in the Accelerated mode, I cannot create a ControlTemplate for their Selected and Unselected visual states.
I realize that I can change the symbol to a different one manually (after changing the RendererTakesPrecedence property to false), but I wondered if there is any manner that is more "conventional" for handling selections when using this type of renderer - or in short - what's the "by-design" manner to handle it according to Esri?
Or maybe a way to draw some sort of a contour line around the selected symbols?

Thanks in advance!
Miri.
0 Kudos
1 Solution

Accepted Solutions
MichaelBranscomb
Esri Frequent Contributor
Hi Miri,

Unfortunately it's currently not possible to select messages/symbols processed via the MessageProcessor. However we are planning to add this in a future release - it would really help us if you could provide some information on how you would like the selections to work in your app?

e.g. Is it enough to support a select/highlight action within the message?

Or would you like to be able to support additional app/user-level interaction?
e.g.
- Manual user selection (click, drag rectangle, etc)?
- User/app selection based on attribute query?
- User/app selection based on spatial query - rectangle? irregular polygons?


If you're not keen to post the information on the forums then please email me at mbranscomb@esri.com.

Cheers

Mike

View solution in original post

0 Kudos
4 Replies
MichaelBranscomb
Esri Frequent Contributor
Hi Miri,

Unfortunately it's currently not possible to select messages/symbols processed via the MessageProcessor. However we are planning to add this in a future release - it would really help us if you could provide some information on how you would like the selections to work in your app?

e.g. Is it enough to support a select/highlight action within the message?

Or would you like to be able to support additional app/user-level interaction?
e.g.
- Manual user selection (click, drag rectangle, etc)?
- User/app selection based on attribute query?
- User/app selection based on spatial query - rectangle? irregular polygons?


If you're not keen to post the information on the forums then please email me at mbranscomb@esri.com.

Cheers

Mike
0 Kudos
MiriRevivo
Deactivated User
Hi Mike,

I appreciate your quick reply, thanks!
Actually the second manner is the one we are going to need, since the messages themselves come from various sources, and we need to be able to control them visually within the application's scope, on the client side, according to whatever business logic is relevant to each of them.

That's exactly what I'm trying to implement right now - selections according to spatial and alphanumeric queries.
In the mean time, I've been trying to make the unselected graphics to have a different opacity value than the ones that are selected, but ran into a problem there as well, since the MultiLayerSymbol does not support it.
If you could suggest an idea as to how to control the opacity of individual graphics within the message group layer - that would be awesome.

Thanks!
Miri.
0 Kudos
MiriRevivo
Deactivated User
Well I've worked around the selection and opacity issues for now by turning the original message layer almost transparent, and adding the selected graphics to a message group layer that only serves for selection purposes and that has the opacity value set to 1.0.
Not that elegant, to say the least, but that's the only thing that worked while maintaining the military symbology of the selected graphics.
If anyone has a different suggestion - I'd be more than happy to hear it.

Thanks,
Miri.
0 Kudos
MichaelBranscomb
Esri Frequent Contributor
Hi,

It sounds like you have found a workable solution. The MessageGroupLayer manages it's own collection of GraphicsLayers and therefore it's not advisable to attempt to work with these GraphicsLayers/Graphics directly. Instead the MessageGroupLayer should be considered something of a "black box".

We are planning to add some highlight behaviour to the MessageProcessor for the next release.

Cheers

Mike
0 Kudos