Select to view content in your preferred language

Edit AdvanceSymbology

968
2
05-23-2013 07:48 AM
Labels (1)
JesúsVillajos1
Occasional Contributor
Hi

Is it possible to edit the geometry with AdvancedSymbology?
Is it possible to move a graphic with AdvancedSymbology?

I need edit an 'Message' like this:
// Create a new message
Message msg = new Message();           
           
//set the ID and other parts of the message
msg.Id = messageID;
msg.Add("_type", "position_report");
msg.Add("_action", "update");
msg.Add("_control_points", X.ToString() + "," + Y.ToString());
msg.Add("_wkid", "3857");
msg.Add("sic", symbolID);
msg.Add("UniqueDesignation", "1");
          
//Process the message using the MessageProcessor within the MessageGroupLayer
_messageLayer.ProcessMessage(msg);

//or this Message
/* 
* |== Example Message ==|
* 
* <message>
*      <_type>position_report</_type>
*      <_action>update</_action>
*      <_id>16986029-8295-48d1-aa6a-478f400a53c0</_id>
*      <_wkid>3857</_wkid>
*      <sic>GFGPOLKGS-----X</sic>
*      <_control_points>-226906.99878,6679149.88998;-228500.51759,6677576.8009;-232194.67644,6675625.78198</_control_points>
            *      <UniqueDesignation>DIRECTION OF ATTACK</UniqueDesignation>
            * </message>
            */




because I need move it or resize. It is possible?
0 Kudos
2 Replies
MatthewSerbinski
Emerging Contributor
to move the message you will either need to create a new message (using the original message id) or edit the original message updating the "_control_points" field with the new position to move to. Here is a sample (untested) that should work:
// sample creating a new message:
Message msg = new Message();
msg.Id = OriginalMessageID;
msg.Add("_type", "position_report");
msg.Add("_action", "update");
msg.Add("_control_points", X + "," + Y);
msg.Add("_wkid", "3857");
msg.Add("sic", symbolID);
_messageLayer.ProcessMessage(msg);


// sample editing the original message:
Message originalMsg = _messageLayer.GetMessage(msg.Id);
originalMsg["_action"] = "update";
originalMsg["_control_points"] = X + "," + Y;
_messageLayer.ProcessMessage(originalMsg);


to edit the geometry, I assume there is a symbol xaml file located somewhere that you can override the template. Perhaps someone else can answer that part of your question.
0 Kudos
MichaelBranscomb
Esri Frequent Contributor
Hi,

That's correct - to move an existing message you create a message with the action Update and pass in the ID of the message you want to move.

Unfortunately it's not currently possible to alter the symbol size - we hope to be able to implement that for the next release.

Cheers

Mike
0 Kudos