Additional Parameters to an Invoke URL Command

With this release of MapGuide, the current selection is the only variable that can be passed as part of an Invoke URL command.

To pass the current selection, edit the web layout. Define a new Invoke URL command. On the Additional Parameters tab, enter a key and value. The key must be a valid HTTP POST key. For the value, enter $CurrentSelection. Add the command to the toolbar, context menu, or task bar menu.

When the command is executed, the current selection is passed to the page, along with the standard variables like SESSION and MAPNAME.

For example, if you define the key SEL to have the value $CurrentSelection, then when the URL is invoked

$selection = $_POST['SEL'];

gets the current selection, in XML format.

See Working With the Active Selection for details about using the XML data.