Maptitude GISDK Help |
This function has been superceded by AddLayer().
Adds a layer from a compact geographic file to a map.
actual_lyr_name = AddCDFLayer(string map_name, string layer_name, string db_name, string db_layer_name)
Argument |
Contents |
map_name |
The name of the map to which the image is added |
layer_name |
The desired name for the layer in the map |
db_name |
The full path and file name of the geographic file that contains the layer |
db_layer_name |
The layer name as defined in the geographic file |
A string indicating the actual name of the layer, which is identical to layer_name unless the layer name is already in use.
AddLayer() is the preferred GISDK function for adding a layer to a map. AddCDFLayer() is equivalent to not passing options to AddLayer().
If the map_name is null, AddCDFLayer() adds the layer to the current map.
Adding a layer to a map does not set any display characteristics for the layer. In other words, the layer is not visible until display colors and styles are assigned. Default display settings can be made with the New Layer Default Settings Standard Interface Macro.
Maptitude keeps track of geographic files and their layer names in the workspace, not just in individual map and dataview windows. The same geographic file can have the same layer name in different maps, but different geographic files cannot have the same layer name even if they are in different maps. In the latter case, Maptitude adds a colon and a sequence number to the desired layer name to make the actual layer name unique.
// Before running the example, create a map by opening nesouth.cdf
// in the Tutorial folder.
folder = RunMacro("G30 Tutorial Folder")
new_lyr = AddCDFLayer (, "Place", folder + "nes_plc.cdf", "Place")
RunMacro("G30 new layer default settings", new_lyr)
Error Type |
Meaning |
Error |
The map or the specified geographic file does not exist; or the file is not a valid geographic file; or db_layer_name is not found in the file; or the layer is already in the map |
Function |
Summary |
Adds an existing layer in the workspace to a map |
|
Adds a layer from a geographic file to a map |
|
Adds a layer to a workspace without it appearing in a map or dataview |
|
Adds an image layer to a map |
|
Removes a layer from a map |
|
Gets information on layers in the system and the current layer. |
©2025 Caliper Corporation | www.caliper.com |