| MGDigitizePolygonObserverEx.onDigitizedPolygon |
|
public abstract void onDigitizedPolygon(MGMap map,int numPoints, MGCollection latlon)
The polygon-digitizing observer method.
This topic describes this event for Plug-In and Java Edition only. For ActiveX Control, see onDigitizedPolygon.
This method is called by and Java Editions when digitizePolygonEx in MGMap has completed its operation. MGDigitizePolygonObserverEx replaces the interface MGDigitizePolygonObserver from earlier versions of the Autodesk MapGuide Viewer API. The older interface will still work in Release 6, but you should use MGDigitizePolygonObserverEx for all future development.
Plug-In and Java Edition only
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.
none
To handle this event from the Plug-In or Java Edition, a Java object that implements the MGDigitizePolygonObserverEx interface must be passed to the digitizePolygonEx method. The observer Java object should include the following:
<class_definition> implements MGDigitizePolygonObserverEx
{
// ...
public void onDigitizedPolygon(MGMap map,
int numPoints
MGCollection points)
{
// 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.