Each map has a collection of FeatureLayers represented by the Layers class. The order in the
collection is the order in which the layers are drawn. Methods in the collection class include Add,
Insert, Move, and Delete. The Layers collection is derived from the LayersBase class. The best way
to enumerate through the layers is to use a Layer filter.
In order to change a layer it first needs to be made editable. This can be done changing its setting in
the Layer Control or programmatically by changing its EditMode property. Once a layer is editable,
features in that layer can be moved, resized, or deleted.
Note : Any edits made to a particular layer take effect immediately so exercise caution when
selecting features in an editable layer.
To implement a filter use the MapLayerFilterFactory class. This class allows you to create a filter
from a set of stock filters such as layer types or all visible layers.
The Table class is the basic unit of all data access. Table, Column, and all TAB file metadata
information is accessible from a MapInfo Table. Tables may be mappable (contain a column of type
FeatureGeometry) or non-mappable. Tables also may be open and accessed without displaying a
When tables are opened, they can be assigned a name (or alias) which is used while the table is
open for referencing the table. For example, the table may be referred to by its alias in SQL
statements. A table that is opened from a TAB file is assigned a default alias if no alias is specified.
The default alias is based upon the name of the TAB file. This property is optional and may be set to
null. However, it is good practice to assign an alias.
A Column object identifies the properties of a column in a table, feature, or feature collection and
specifies the column’s name (alias), data type, width (for string and decimal columns), and other
properties of the column.
Note The MapInfo.Data.MIDataReader.GetDateTime method works with both DateTime and Date
data types. In both cases, a System.DateTime value is returned. However, the
MapInfo.Data.Column.DataType property will reflect the actual data type, either Date or
The MapLayer class is the base class of any layer. This class implements the IMapLayer interface.
Properties include Enabled, VisibleZoomRange, Name, and Alias. Use this class to access generic
The UserDrawLayer is an abstract class that allows you to override the draw method to draw your
own layer. It provides an efficient way to add custom objects on top of a MapControl using Windows
drawing methods, instead of creating new features using map coordinates and actually adding them
to a map.
The ObjectThemeLayer class contains one of three different types of themes (pie chart, bar chart,
and graduated symbol). This layer behaves just like other layers and can be grouped, have visibility
This is class represents a group of layers that are moved and turned on/off in unison. A GroupLayer
is a LayersBase collection combined with an IMapLayer. This object also supports the ability to do
If the layer is in a group with a VolatilityHint equal to Animate then only those layers within that group
need to be redrawn. If the Layer has a VolatilityHint equal to CacheIfPossible or Normal then all
layers need to be redrawn.
The IMapLayersFilter and IMapLayersFilterFactory interfaces provide support for layer enumeration.
The IVisibilityConstraint is an interface which determines whether a particular object is visible or not.
This interface is implemented by a wide number of types, including all Layer types, LabelModifiers,
FeatureStyleModifiers, and Themes.