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

Syntax

ActiveX Control: boolean digitizeRectangle()

Plug-In/Java Edition: boolean digitizeRectangle(MGDigitizeRectangleObserver observer)

Description

Enables the user to define a rectangle on the map by clicking and dragging the mouse, then fires the onDigitizedRectangle event upon completion.

digitizeRectangle does not perform any functions other than sending the rectangle coordinates to onDigitizedRectangle. Users can cancel digitizeRectangle by pressing the ESC key or by right-clicking the mouse. For Autodesk MapGuide Viewer Plug-In, the observer parameter specifies the object that either handles the event or forwards it back to JavaScript.

Note that this method does not work during a busy state. For additional information about the busy state, refer to "Handling Busy State and Map Refresh" chapter in the Autodesk MapGuide Developer's Guide.

Parameters

observer - A Java object that implements MGDigitizeRectangleObserver (Plug-In and Java Edition only).

Returns

boolean - Returns True if successful; otherwise, returns False.

Error Codes

-1 (busy)

See Also

digitizePolygon