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

Syntax

ActiveX Control: boolean selectPolygon(MGMapLayer layer, MGCollection latlon)

Plug-In/Java Edition: boolean selectPolygon(MGMapLayer layer, Vector latlon)

Plug-In/Java Edition: boolean selectPolygon(MGMapLayer layer, Vector lat, Vector lon)

Description

Selects all map features that fall within the specified polygon.

For compatibility between the Autodesk MapGuide Viewer Plug-In, Java Edition, and ActiveX Control, use selectPolygonEx instead of selectPolygon.

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

layer - Map layer containing the features to select, or null to select from all layers. A map layer must be selectable for any features on it to be selected.

latlon - A java.util.Vector (or MGCollection) object used to stored the list of latitude/longitude pairs represented by MGPoint objects.

lat - A java.util.Vector object used to store the list of latitude (Y) values of polygon vertices represented by java.lang.Double objects (Plug-In and Java Edition only).

lon - A java.util.Vector object used to store the list of longitude (X) values of polygon vertices represented by java.lang.Double objects (Plug-In and Java Edition only).

Returns

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

Error Codes

-1 (busy)

-3 (illegal argument)

See Also

selectPolygonEx