MGMap.copyUrl   Go to object model Go to parent topic Go to previous topic Go to next topic

Syntax

void copyUrl()

Description

Copies the URL of the displayed map to the clipboard.

This method is the equivalent of the Copy > Copy As URL menu command in the user interface.

Note that this method only copies the URL; it does not return it as a value.

Error Codes

-1 (busy)

Example

The following example is designed to work with the Tutorial.mwf file that is included with Autodesk MapGuide Author. It copies the URL of the map to the clipboard, where it can then be pasted into a file by the user or by a program you write:

function copyUrlToClipboard()
{
    var url = getMap().copyUrl();
    alert ("Map URL has been copied to the Clipboard!");
}

See Also

getUrl, setUrl