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

The MGMapLayerSetup object provides run-time access to map layer setup through methods that let you change data source names and alter the way map features are linked to databases.

You can access all map layer setup attributes of all types of map layers with MGMapLayerSetup. If you attempt to query or modify an attribute that does not apply to the map feature you are working on, the method call fails and sets an error code indicating so in the MGError object.

Java Development for Autodesk MapGuide Viewer Plug-In: For Autodesk MapGuide Viewer Plug-In, the Java class MGMapLayerSetup 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, MGMapLayerSetup 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

getDatabaseSetup

Gets the MGDatabaseSetup object for this layer.

getDataFile

Returns the name of the data file from which Autodesk MapGuide Server retrieves data for this layer.

getDwgDataSources

Returns the MGDwgDataSources object for this layer.

getLinkedToDatabase

Indicates whether or not the map features in a spatial data file are linked to a table in a database.

getNameFromSdpFeatureTable

Indicates whether the feature name should come from the SDP feature table or from a secondary table in an OLE DB data source.

getSdpDataSource

Gets the spatial data source name for this map layer.

getSdpFeatureTable

Gets the feature table name for this map layer.

getSdpGeometryColumn

Gets the SDP feature table geometry column name.

getSdpKeyColumn

Gets the SDP feature table key column.

getSdpKeyColumnType

Gets the SDP feature table key column type.

getServerUrl

Gets the Autodesk MapGuide Server URL, including the name of the map agent file.

getSourceType

Gets the source of the map data on this layer.

getURLFromSdpFeatureTable

Indicates whether the feature URL should come from the SDP feature table or from a secondary table in an OLE DB data source.

getWhereFromSdpFeatureTable

Indicates whether the feature SQL Where clause should come from the SDP feature table or from a secondary table in an OLE DB data source.

setDataFile

Sets the name of the data file from which Autodesk MapGuide Server retrieves data for this layer.

setLinkedToDatabase

Sets the NameFromSdpFeatureTable, UrlFromSdpFeatureTable, and WhereFromSdpFeatureTable properties to True or false.

setNameFromSdpFeatureTable

Indicates whether the feature name should come from the SDP feature table or from a secondary table in an OLE DB data source.

setSdpDataSource

Sets the Spatial Data Source name for this map layer.

setSdpFeatureTable

Sets the Spatial Data Source name for this map layer.

setSdpGeometryColumn

Sets the name of the SDP feature table geometry column.

setSdpKeyColumn

Sets the name of the SDP feature table key column.

setSdpKeyColumnType

Sets the SDP feature table key column type.

setServerUrl

Sets the Autodesk MapGuide Server URL to the string value that you pass in.

setURLFromSdpFeatureTable

Indicates whether the feature URL should come from the SDP feature table or from a secondary table in an OLE DB data source.

setWhereFromSdpFeatureTable

Indicates whether the feature SQL Where clause should come from the SDP feature table or from a secondary table in an OLE DB data source.

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.

Properties that set layer setup attributes set the layer's rebuild flag, but do not update the display. To update the display, call the refresh method of MGMap.

DatabaseSetup

Gets the MGDatabaseSetup object for this layer.

DataFile

Gets or sets the name of the data file from which Autodesk MapGuide Server retrieves map data for this layer.

LinkedToDatabase

Indicates whether or not the map features in a spatial data file are linked to a table in a database.

MGDwgDataSources

Returns the MGDwgDataSources object for this layer.

NameFromSdpFeatureTable

Indicates whether the feature name should come from the SDP feature table or from a secondary table in an OLE DB data source.

SdpDataSource

Gets or sets the SDP name for this map layer.

SdpFeatureTable

Gets or sets the SDP feature table name for this map layer.

SdpGeometryColumn

Gets or sets the SDP feature table geometry column name.

SdpKeyColumn

Gets or sets the Spatial Data Provider feature table key column name.

SdpKeyColumnType

Gets or sets the SDP feature table key column type.

ServerUrl

Gets or sets the Autodesk MapGuide Server URL.

SourceType

Gets the source of the map data on this layer.

URLFromSdpFeatureTable

Indicates whether the feature URL should come from the SDP feature table or from a secondary table in an OLE DB data source.

WhereFromSdpFeatureTable

Indicates whether the SQL Where clause should come from the SDP feature table or from a secondary table in an OLE DB data source.