Go to object model Go to parent topic Go to previous topic Go to next topic

The MGMapLayer object represents a layer on the map.

Note that instances of the class MGMapLayer cannot be publicly created.

Java Development for Autodesk MapGuide Viewer Plug-In: For Autodesk MapGuide Viewer Plug-In, the Java class MGMapLayer extends java.lang.Object and can be found in the mapguide package, located in the npmapv32.zip file in the Netscape Plugins folder.

Java Development for Autodesk MapGuide Viewer, Java Edition: For Autodesk MapGuide Viewer, Java Edition, MGMapLayer is a Java interface that resides in the com.autodesk.mgjava package, which is located in the mgjava.cab file (for Windows systems only) and the mgjava.jar file (for all platforms).

Methods

compressThemeCats

Displays the list of theme categories shown in the legend for the specified map layer in collapsed form, so that only one category from the list is displayed.

createMapObject

Adds an empty feature to the layer. This method works only with redline layers.

equals

Compares this MGMapLayer object to the specified object.

expandThemeCats

Displays the list of theme categories shown in the legend for the specified map layer in expanded form, so that all categories in the list are displayed.

getLayerSetup

Gets an MGMapLayerSetup object.

getLayerType

Returns a string indicating the layer type.

getLegendLabel

Gets the string used to label the map layer in the legend.

getMap

Gets the map that contains the map layer.

getMapLayerGroup

Gets the map layer group to which the layer belongs.

getMapLayerStyles

Gets a collection containing all of the MGMapLayerStyle objects associated with the layer.

getMapObject

Gets the map feature with the specified key from the layer.

getMapObjects

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).

getMapObjectsEx

Gets an MGCollection object containing the map features of the layer that fall within the map extent.

getName

Gets the name of the map layer.

getPriority

Gets the priority of the map layer.

getRebuild

Gets the map layers rebuild flag.

getSelectability

Returns True if map features within the map layer may be selected.

getShowInLegend

Returns a boolean value indicating whether the map layer should be displayed in the legend.

getSQLWhere

Gets the SQL Where clause for the layer.

getType

Returns a string indicating the type of features the layer contains.

getVisibility

Returns True if the map layer is potentially visible.

isDynamic

Returns a boolean value indicating whether the map layer is dynamic.

isLocked

Indicates whether Autodesk MapGuide Viewer has access to either coordinate values or map layer setup data, depending on the value of the function parameter that is passed in.

isStatic

Returns a boolean value indicating whether the map layer is static.

isVisible

Returns True if the map layer is currently visible on the map.

lock

Prevents Autodesk MapGuide Viewer from having access to either coordinate values or map layer setup data, depending on the value of the function parameter that is passed in.

removeAllObjects

Deletes all features from the layer.

removeObject

Deletes a map feature on the layer.

removeObjects

Deletes the specified map features from the layer.

setAccessKey

Sets the access key associated with a map layer.

setLegendLabel

Sets the string used to label the map layer in the legend. After calling this method, the legend is automatically redrawn.

setMapLayerGroup

Specifies which map layer group the current layer should belong to.

setName

Sets the name of the map layer.

setPriority

Sets the priority of the map layer.

setRebuild

Changes the map layer's rebuild flag.

setSelectability

Sets the selectability of map features within the map layer.

setShowInLegend

Sets a flag indicating whether the map layer should be displayed in the legend.

setSQLWhere

Sets the SQL Where clause for the layer.

setVisibility

Sets the visibility flag indicating whether the map layer is potentially visible.

unlock

Gives Autodesk MapGuide Viewer access to either coordinate values or map layer setup data, depending on the value of the function parameter that is passed in.

Properties

Note that direct access to properties is only available in Autodesk MapGuide Viewer ActiveX Control. In Autodesk MapGuide Viewer Plug-In and Autodesk MapGuide Viewer, Java Edition APIs, get/set methods provide access to an object's properties. For compatibility, the ActiveX Control API supports the same get/set methods as the Autodesk MapGuide Viewer Plug-In and the Autodesk MapGuide Viewer, Java Edition APIs.

AccessKey

Sets the access key for the layer. This value must be 255 characters or less.

Dynamic

Returns True if the map layer is dynamic.

LayerSetup

Gets the MGMapLayerSetup object for this layer. Applies to all layer types except Drawing layers or layers that have been secured.

LayerType

Returns a string indicating the layer type.

LegendLabel

Gets or sets the legend label used by the map layer.

Map

Gets the map containing the map layer.

MapLayerGroup

Specifies the name of the map layer group that the current layer belongs to.

MapLayerStyles

Gets a collection containing all of the MGMapLayerStyle objects associated with the layer.

MapObjects

Gets an MGCollection object containing the map features (MGMapObject objects) of the layer that fall within the map extent.

Name

Gets or sets the name of the map layer.

Priority

Gets or sets the priority of the map layer.

Rebuild

Gets or sets the map layer's rebuild flag.

Selectability

Gets or sets whether features within the map layer may be selected.

ShowInLegend

Specifies whether or not to show the map layer in the legend.

SQLWhere

Gets or sets the SQL Where clause for the dynamic layer.

Static

Returns True if the map layer is static.

Type

A string indicating the type of features the layer contains.

Visibility

Gets or sets whether the map layer is potentially visible.

Visible

Indicates whether the map layer is visible at the current map scale.