Maptitude GISDK Help

GetLayerType()

Summary

Get the type of a layer.

 

Changes

Added Image Library as a layer type in Version 5.0.

 

Syntax

layer_type = GetLayerType(string layer_name)

 

Argument

Contents

layer_name

The name of the layer of interest

 

Returns

A string: "Point", "Line", or "Area" for geographic layers, "Image" for image layers, or "Image Library" for image libraries.

 

Example

lyr = GetLayer()

typ = GetLayerType(lyr)

if typ = "Point" then SetIconColor(lyr + "|", red)

else if typ = "Line" then SetLineColor(lyr + "|", red)

else if typ = "Area" then SetBorderColor(lyr + "|", red)

 

Error Codes

Error Type

Meaning

NotFound

The specified layer does not exist

 

See Also

Function

Summary

GetLayer()

Gets the name of the current layer, if any

IsLayer()

Determines whether a layer is of the given types

 

 

©2025 Caliper Corporation www.caliper.com