MGMapLayerGroup.addMapLayer   Go to object model Go to parent topic Go to next topic

Syntax

boolean addMapLayer(MGMapLayer obj)

Description

Adds an existing map layer to the group. A map layer can only belong to one group at any time.

This method always refreshes the map when the autoRefresh flag is set to True or when called from the onViewChanging or onViewChanged events.

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

obj - An MGMapLayer object.

Returns

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

Error Codes

-1 (busy)

-3 (illegal argument)

See Also

removeMapLayer