Layers, Featurelayer, Featurelayer layers – Pitney Bowes MapXtreme User Manual

Page 243

Advertising
background image

Chapter 12: Adding Mapping Capability to Your Applications

Layers

MapXtreme v7.1

250

Developer Guide

Layers

The following section discusses the Layers objects and classes. The diagram below is a UML
representation of the Layers hierarchy.

FeatureLayer

A FeatureLayer is a layer that displays Features from a Table. For example, a layer of region objects
representing world countries is a FeatureLayer. FeatureLayers can be native .TAB data, remote
RDB, seamless, or raster data.

Layers

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 LayerControl or programmatically by changing its EditMode property. Once a layer is editable,
features in that layer can be moved, resized, or deleted.

L

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. To create your own filter write a
class that implements the interface, IMapLayerFilter.

Advertising