onDigitizedPolygon   Go to object model Go to parent topic Go to previous topic Go to next topic

Syntax

onDigitizedPolygon map, numPoints, latlon

Description

This event is fired when the user has finished digitizing a polygon. It is initiated by a call to digitizePolygonEx.

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

Applies To

ActiveX Control only

Parameters

map - Specifies the MGMap instance.

numPoints - The number of vertices of the polygon.

latlon - An MGCollection object that stores a list of MGPoint objects, each of which represents a longitude-latitude pair.

Error Codes

none

Example

To handle this event from the Autodesk MapGuide ActiveX Control, define the following VBScript and JavaScript functions:

<!--
The VBScript function handles the event from the ActiveX Control 
Control and then passes it to the JavaScript function.
-->
<SCRIPT LANGUAGE="VBScript">
Sub ObjectId_onDigitizedPolygon(map, numPoints, points)
onDigitizedPolygon map, numPoints, points
End Sub
</SCRIPT>

<SCRIPT LANGUAGE="JavaScript">
function onDigitizedPolygon(map, numPoints, points)
{
// event handling code here...
}
</SCRIPT>

Where ObjectId is the ID of the embedded map specified as part of the HTML OBJECT tag. Refer to "Displaying Maps" in the Autodesk MapGuide Developer's Guide for details on how to embed the ActiveX Control using the OBJECT tag.

See Also

digitizePolygonEx