CMapLayer

The CMapLayer class provides functionality of a map layer.

Each map layer is represented by one database. Each database row is one map object. Depends on map object type, one layer may consist of 1, 2, 3 or 4 files.

Map objects type

Keymap layer files

only node

.mpl, .kdtree

only image and text

.mpl and .xtree

polygon, polyline etc.

.mpl, xtree and .geo

all kinds of objects

.mpl, xtree, .kdtree and .geo

Each map may consists of several layers, i.e. several databases. In Keymap SDK terminology map also called as workspace. The Map Workspace file (.mpw) does not contain any GIS data and defines only a set of map layers and its properties. One map, i.e. one mpw file consists of only layers with the same projection and datum.

CMapLayer provides member functions for map objects access, control and manipulation. CMapLayer class stores a pointer to the map (i.e. CMapT object).

Keymap SDK stores all map objects in proprietary-format database. If you need to manipulate, or modify some map objects using API, call CMapLayer::GetObject, CMapLayer::GetObjectIndex to load specified object from database. To apply change made to specified object, use CMapObject::Commit. To avoid memory leaks, delete loaded object if no longer needed. Please refer to Accessing map objects from your source code article.

All changes made to layer database will not be saved permanently until method CMapLayer::Commit called.

 

Class Members | Hierarchy Chart