ArcGIS Runtime SDK for WPF - Library Reference
ProcessMessage Method
See Also  Example
ESRI.ArcGIS.Client.AdvancedSymbology Namespace > MessageLayer Class : ProcessMessage Method

message
The Message to be processed.
Processes a message instance and either updates, selects or removes the message on the MessageLayer.

Syntax

Visual Basic (Declaration) 
Public Function ProcessMessage( _
   ByVal message As Message _
) As Boolean
C# 
public bool ProcessMessage( 
   Message message
)

Remarks

The ProcessMessage method takes a Message instance and performs the appropriate action (as specified by the "_action" key):

A fundamental part of Message processing is the correct generation of the symbol geometry. The MessageLayer automatically generates the symbol based on the provided symbol id code (sic) and the control points. It is important to note that for some symbols the required control points which define the symbol do not necessarily correlate to the standard geometry types of point, polyline, and polygon.

Parameters

message
The Message to be processed.

Example

The following example shows how to create a new message with the action update and add the message to a message layer in the Map by calling process message.
C#Copy Code
/*
 * Add using statements:
 * using ESRI.ArcGIS.Client.AdvancedSymbology;
 * using ESRI.ArcGIS.Client.Geometry;
 * using System.Collections;
 */ 
// Use the static MessageHelper class to create a new Message instance with a key, value of _action, "update".
Message message = MessageHelper.CreateMilitaryUpdateMessage("MyStringIdentifier", "position_report", new List<MapPoint> { new MapPoint(3.22, 53.9) }, new Dictionary<string, string>()
{
    { "sic", "GHGPGPWA------X" }
},
new SpatialReference(4326));
            
// Get the MessageLayer instance from the Map
MessageLayer messageLayer = _map.Layers["MyMessageLayer"] as MessageLayer;
            
// Instruct the MessageLayer to process the Message.
messageLayer.ProcessMessage(message);
VB.NETCopy Code
'
' * Add using statements:
' * Imports ESRI.ArcGIS.Client.AdvancedSymbology
' * Imports ESRI.ArcGIS.Client.Geometry
' * Imports System.Collections
'             
Dim message As Message
message = MessageHelper.CreateMilitaryUpdateMessage("MyStringIdentifier", "position_report", _
    New List(Of MapPoint)() From _
    { _
        New MapPoint(3.22, 53.9) _
    }, _
    New Dictionary(Of String, String)() From _
    { _
        { _
            "sic", "GHGPGPWA------X" _
        } _
    }, _
    New SpatialReference(4326))
            
' Get the MessageLayer instance from the Map
Dim messageLayer As MessageLayer = TryCast(_map.Layers("MyMessageLayer"), MessageLayer)
            
' Instruct the MessageLayer to process the Message.
messageLayer.ProcessMessage(message)

Requirements

Target Platforms: Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family, Windows 7, Windows 8

See Also

© ESRI, Inc. All Rights Reserved.