Maptitude GISDK Help

IsLayer()

Summary

Determines whether a layer is any of the given types.

 

Changes

New layer types added in Version 5.0.

 

Syntax

answer = IsLayer(string layer_name, array types)

 

Argument Contents
layer_name The name of the layer to be tested
types An array of strings with one or more layer types as shown below

 

Type Meaning
DBD Point A point layer from a standard geographic file; includes DBD Node
DBD Node A node layer from a standard geographic file
DBD Line A line layer from a standard geographic file
DBD Area An area layer from a standard geographic file
DBD Any type of layer from a standard geographic file
CDF Point A point layer from a compact geographic file; includes CDF Node and CDF Grid
CDF Node A node layer from a compact geographic file
CDF Grid A grid layer from a compact geographic file
CDF Line A line layer from a compact geographic file
CDF Street A street layer from a compact geographic file
CDF Area An area layer from a compact geographic file
CDF Any type of layer from a compact geographic file
SDO Point A point layer from an Oracle Spatial table
SDO Line A line layer from an Oracle Spatial table
SDO Area An area layer from an Oracle Spatial table
SDO Any type of layer from an Oracle Spatial table
SHAPE Point A point layer from a Shapefile layer
SHAPE Line A line layer from a Shapefile layer
SHAPE Area An area layer from a Shapefile layer
SHAPE Any type of layer from a Shapefile layer
MITAB Point A point layer from a MapInfo TAB file layer
MITAB Line A line layer from a MapInfo TAB file layer
MITAB Area An area layer from a MapInfo TAB file layer
MITAB Any type of layer from a MapInfo TAB file layer
Geodatabase Point A point layer from an Esri Geodatabase layer
Geodatabase Line A line layer from an Esri Geodatabase layer
Geodatabase Area An area layer from an Esri Geodatabase layer
Geodatabase Any type of layer from an Esri Geodatabase layer
ODBC Point A point layer from an ODBC table
ODBC Any type of layer from an ODBC table; currently includes only ODBC Point
External Any type of layer from an external (non-Caliper) format, including those from an Oracle Spatial table, Shapefile layer, MapInfo TAB file layer, Esri Geodatabase layer, or ODBC table
Geo Point A point layer from either a standard or compact geographic file, or an SDO Point, SHAPE Point, MITAB Point, GeoDatabase Point, ODBC Point, or Traffic Point; includes DBD Node, CDF Node, and CDF Grid
Geo Node A node layer from either a standard or compact geographic file
Geo Grid Any type of grid layer; currently includes only CDF Grid
Geo Line A line layer from either a standard or compact geographic file, or an SDO Line, SHAPE Line, MITAB Line, GeoDatabase Line, or Traffic Line
Geo Area A area layer from either a standard or compact geographic file, or an SDO Area, SHAPE Area, MITAB Area, or GeoDatabase Area
Point Any type of point layer
Line Any type of line layer
Area Any type of area layer
Geographic Any type of point, line, or area layer
Image A raster image layer
Image Library A library of raster images

 

Returns

An integer value of 1 (True) if the layer is of one of the designated types, or 0 (False) otherwise.

 

Notes

Example

if IsLayer(GetLayer(), {"Point", "Area"}) then

     SetIconColor(null, blue)

else

     SetFillColor(null, blue)

 

Error Codes

Error Type Meaning
NotFound There is no layer with the given name
Error One of the entries in the types array is invalid

 

See Also

Function Summary
GetLayer() Gets the name of the current layer, if any
GetLayerType() Gets the type of a layer

 

 

©2025 Caliper Corporation www.caliper.com