Maptitude GISDK Help |
Adds an image layer to a map.
actual_lyr_name = AddImageLayer(string map_name, string layer_name, string file_name)
Argument |
Contents |
map_name |
The name of the map to which the image is added |
layer_name |
The desired name for the image layer |
file_name |
The full path and file name of the image file |
A string indicating the actual name of the layer; identical to layer_name unless the layer name is already in use.
The map must be set to the projection of the image layer with SetMapProjection() before the image layer is added.
If the image is registered, it is displayed in its correct location.
If the image is not already registered, AddImageLayer() automatically fits it into the map window and registers it at that location.
Maptitude keeps track of geographic and image files and their layer names in the workspace, not just in individual map windows. The same image file can have the same layer name in different maps, but different geographic or image 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.
lyr = AddImageLayer("Map of New York", "Topo Map", "j:\\nycity.tif")
Error Type |
Meaning |
Error |
The image file is corrupt or in an unsupported format |
NotFound |
The map or the specified image file does not exist |
Function |
Summary |
Adds an existing layer in the workspace to a map |
|
Adds a layer from a standard geographic file to a map |
|
Adds a layer to a workspace without it appearing in a map or dataview |
|
Adds a layer from a compact format geographic file to a map |
|
Gets a list of the layers in a map |
|
Gets the display and interpolation specifications of an image layer |
|
Removes a layer from a map |
|
Sets the display and interpolation specifications of an image layer. |
|
Gets information on layers in the system and the current layer |
©2025 Caliper Corporation | www.caliper.com |