Select to view content in your preferred language

How to query the Message Processor/Layer (mil2525c)?

1362
1
Jump to solution
08-10-2016 12:10 AM
JohannesOhlemacher
Deactivated User

We use the ArcGIS SDK for Qt to display nautical maps from a WMS Server. On top of the actual map, we have a MessageGroupLayer for mil2525c messages. The messages are rendered just fine, but how do i query them? For example i want to enable the user to click on a message on the map to get more Information about it. How do i do that?

How do i get a message at or near a certain location?

0 Kudos
1 Solution

Accepted Solutions
LucasDanzinger
Esri Frequent Contributor

Hi Johannes,

Once you start sending messages into the MessageGroupLayer, a new GraphicsLayer is created for the different geometry types. The MessageGroupLayer then becomes basically a GroupLayer of GraphicsLayers. What you can do is get the individual layer out of the MessageGroupLayer with GroupLayerBase::getLayers, then static_cast the one you want to GraphicsLayer. Once you have a GraphicsLayer, you can call graphicIds, and pass in your screen coordinates from a mouse click event, and it will return a list of graphic IDs that you clicked near.

- Luke

View solution in original post

1 Reply
LucasDanzinger
Esri Frequent Contributor

Hi Johannes,

Once you start sending messages into the MessageGroupLayer, a new GraphicsLayer is created for the different geometry types. The MessageGroupLayer then becomes basically a GroupLayer of GraphicsLayers. What you can do is get the individual layer out of the MessageGroupLayer with GroupLayerBase::getLayers, then static_cast the one you want to GraphicsLayer. Once you have a GraphicsLayer, you can call graphicIds, and pass in your screen coordinates from a mouse click event, and it will return a list of graphic IDs that you clicked near.

- Luke