MGDigitizePolylineObserverEx.onDigitizedPolyline   Go to object model Go to parent topic

Syntax

public abstract void onDigitizedPolyline(MGMap map, int numPoints, MGCollection latlon)

Description

The polyline-digitizing observer method.

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

This method is called by when digitizePolyline in MGMap has completed its operation. MGDigitizePolylineObserverEx replaces the interface MGDigitizePolylineObserver from earlier versions of the Autodesk MapGuide Viewer API. The older interface will still work in version 6.0, but you should use MGDigitizePolylineObserverEx for all future development.

Applies To

Plug-In and Java Edition only

Parameters

map - Specifies the MGMap instance.

numPoints - The number of vertices of the polyline.

latlon - An MGCollection object that stores a list of MGPoint objects, each of which represents a vertex of the polyline.

Error Codes

none

Example

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

<class_definition> implements MGDigitizePolylineObserverEx
{
// ...
public void onDigitizedPolyline(MGMap map, int numPoints
    MGCollection latlon)
{
// 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

digitizePolylineEx