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

Syntax

ActiveX Control: MGCollection getMapObjects()

Plug-In/Java Edition: Vector getMapObjects()

Description

Returns a Vector (or MGCollection object) containing the map features of the layer that fall within the map extent (the part of the map that is displayed).

If the pan function is used, a subsequent call to getMapObjects will return the displayed map features. However, if the zoom function is used, a subsequent call to getMapObjects will return the highest number of map features that were ever displayed.

For compatibility between the Autodesk MapGuide Viewer Plug-In and Autodesk MapGuide Viewer ActiveX Control of Autodesk MapGuide Viewer, 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.

Returns

ActiveX Control: MGCollection - A collection of MGMapObject objects. Returns empty MGCollection if unsuccessful.

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

Error Codes

-1 (busy)

See Also

getMapObjectsEx