Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am using an ESRI toolbar control buddied with a map control.

I am using a command. Below is a simple example.

My question is to clarify - having the ServerAction method is a requirement when you are using the toolbar control and server side action?


public class CustomExtent : IMapServerCommandAction //implements the IServerAction interface
{
    public CustomExtent()
    {
    }

#region IServerAction Members

public void ServerAction(ToolbarItemInfo info)
{
   Map map = info.BuddyControls[0] as Map;
   map.Extent = new Envelope(-90, 10, -70, 5);
}

share|improve this question

1 Answer 1

As quoted from the web ADF reference documentation:

Classes that will be used as the ServerActionClass for a toolbar item must implement this method.

So, unless I misunderstood the question, the answer is yes.

share|improve this answer
    
GuillaumeC: I read that piece in the documentation which is why I was wanting a clarification to be sure I did not miss anything. I was also curious if someone has been able to implement it differently. I am thinking about creating a toolbar class that just handles the ServerAction Methods that just call and pass parameters to my other classes. –  shawn deutch Aug 11 '10 at 16:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.