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

Syntax

MGCollection getMapObjectsEx(MGMapLayer 
  layer)

Description

Gets a collection containing the selected map features.

This method replaces the getMapObjects method in earlier versions of the Autodesk MapGuide Viewer API and supports the Autodesk MapGuide Viewer Plug-In, Java Edition, and ActiveX Control Control with the same syntax. The older method will still work in Release 6, but you should use getMapObjectsEx for all future development.

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 - If non null, only feature keys within the specified layer are returned; otherwise, all feature keys are returned.

Returns

MGCollection - A collection of the selected MGMapObjects, or empty collection if unsuccessful.

Error Codes

-1 (busy)