MGDigitizeRectangleObserver.onDigitizedRectangle   Go to object model Go to parent topic

Syntax

public abstract void onDigitizedRectangle(MGMap map, MGPoint anchorPt, MGPoint endPt)

Description

The rectangle-digitizing observer event method. This event is fired when the user has finished digitizing a rectangle. It is initiated by a call to digitizeRectangle.

This topic describes this event for Plug-In and Java Edition only. For ActiveX Control, see onDigitizedRectangle.

This method is called by when digitizeRectangle in MGMap has completed its operation.

Applies To

Plug-In and Java Edition only

Parameters

map - The map object for which the event occurred.

anchorPt - The MGPoint object containing the longitude and latitude of the digitized rectangle's starting (anchor) point.

endPt - The MGPoint object containing the longitude and latitude of the digitized rectangle's ending point.

Error Codes

none

Example

To handle this event from the Plug-In or Java Edition, a Java object that implements the MGDigitizeRectangleObserver interface must be passed to the digitizeRectangle method. The observer Java object should include the following:

<class_definition> implements MGDigitizeRectangleObserver
{
// ...
public void onDigitizedRectangle(MGMap map, 
MGPoint anchorPt
MGPoint endPt)
{
// event handling code here...
}
// ...
}

The simplest way to include the observer object in a Web page is to implement it as an applet. See Advanced Examples for a fully functional observer object that supports all of the observer interfaces by forwarding the events back to JavaScript functions that have identical semantics to the ActiveX Control event handlers.

See Also

digitizeRectangle