MGSelection.getMapObjects   Go to object model Go to parent topic Go to previous topic Go to next topic

Syntax

ActiveX Control: MGCollection getMapObjects(MGMapLayer layer)

Plug-In/Java Edition: Vector getMapObjects(MGMapLayer layer)

Description

Returns a Vector (or MGCollection) of selected map features.

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

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" in the Autodesk MapGuide Developer's Guide.

Parameters

layer - The layer from which features will be returned (if null, features are returned from all layers).

Returns

ActiveX Control: An MGCollection of MGMapObject objects. Returns empty MGCollection if unsuccessful.

Plug-In and Java Edition: Vector - A java.util.Vector of MGMapObject objects. Returns empty Vector if unsuccessful.

Error Codes

-1 (busy)