Passing Viewer Information to the Web Server

The Viewer manages many details about the state of the active map. These details are not always directly available to the Web Server. They are local to the Viewer, and are available through JavaScript calls to the Viewer API.

Because of this, when the Viewer makes a request to an Infrastructure Map Server Page on the Web Server, it must often pass information as part of the request. Some common methods for passing this information are:

The best method to use depends on the requirements of the application. If you are invoking the request from a command defined in a web layout, you can pass the information either as an additional parameter to an Invoke URL command or through an Invoke Script command. Invoke URL is simpler, but it offers a restricted set of parameters. Invoke Script has complete access to all the JavaScript calls in the Viewer API.

If you are invoking the request from a page in the task pane, you can execute JavaScript as part of an onClick event or a form action.