Functions | Properties
Layer management
Map modules

Functions

int AxMap.AddLayer (object Object, bool Visible)
 Adds a layer to the map.
object AxMap.get_GetObject (int LayerHandle)
 Returns the layer object with the given handle. The object could be a Shapefile, Grid, or Image object.
Image AxMap.get_Image (int LayerHandle)
 Gets image object associated with the layer.
int AxMap.get_LayerHandle (int LayerPosition)
 Gets the handle of the layer at the given position in the map. Returns -1 if there is no layer at the specified position.
int AxMap.get_LayerPosition (int LayerHandle)
 Gets the position of the specified layer in the map.
Shapefile AxMap.get_Shapefile (int LayerHandle)
 Gets shapefile object associated with the layer.
bool AxMap.MoveLayer (int InitialPosition, int TargetPosition)
 Moves a layer in the map from the initial position to a target position.
bool AxMap.MoveLayerBottom (int InitialPosition)
 Moves the specified layer below all other layers.
bool AxMap.MoveLayerDown (int InitialPosition)
 Moves the specified layer down one layer in the map.
bool AxMap.MoveLayerTop (int InitialPosition)
 Moves the specified layer to the top of all other layers.
bool AxMap.MoveLayerUp (int InitialPosition)
 Moves the specified layer up one layer in the map.
void AxMap.RemoveAllLayers ()
 Removes all layers from the map.
void AxMap.RemoveLayer (int LayerHandle)
 Removes the specified layer from the map.
void AxMap.RemoveLayerWithoutClosing (int LayerHandle)
 Removes layer from the map without its closing.
void AxMap.ReSourceLayer (int LayerHandle, string newSrcPath)
 Changes the data source for the specified layer without its closing.
void AxMap.set_Image (int LayerHandle, Image __p2)
 Replaces the image object associated with the layer.
void AxMap.set_Shapefile (int LayerHandle, Shapefile __p2)
 Replaces the shapefile object associated with the layer.

Properties

int AxMap.NumLayers [get, set]
 Gets the number of layers loaded in the map.

Detailed Description

Here is a list of properties and methods which allow to work with layers of the map. This module is a part of the documentation of AxMap class.

dot_inline_dotgraph_9.png

Graph description


Function Documentation

int AxMap.AddLayer ( object  Object,
bool  Visible 
)
object AxMap.get_GetObject ( int  LayerHandle)

Returns the layer object with the given handle. The object could be a Shapefile, Grid, or Image object.

Parameters:
LayerHandleThe handle of the layer to be retrieved.
Returns:
A Shapefile, Grid, or Image object.
Examples:
SortLayers.cs.
Image AxMap.get_Image ( int  LayerHandle)

Gets image object associated with the layer.

This method along with AxMap.get_Shapefile() can used to subtitute AxMap.get_GetObject().

Parameters:
LayerHandleThe handle of the layer.
Returns:
The reference to the image or NULL reference in case of invalid handle or wrong layer type.
New API 4.8:
Added in version 4.8
int AxMap.get_LayerHandle ( int  LayerPosition)

Gets the handle of the layer at the given position in the map. Returns -1 if there is no layer at the specified position.

Parameters:
LayerPositionThe position of the layer for which the layer handle is required.
Returns:
The layer handle for the layer at the specified position.
Examples:
EditAttributes.cs, RemoveShape.cs, SelectBox.cs, SortLayers.cs, SplitByAttribute.cs, and ToolTip.cs.
int AxMap.get_LayerPosition ( int  LayerHandle)

Gets the position of the specified layer in the map.

Parameters:
LayerHandleThe layer handle of the layer for which the layer position is required.
Returns:
The layer position of the specified layer in the map.
Examples:
SortLayers.cs.
Shapefile AxMap.get_Shapefile ( int  LayerHandle)

Gets shapefile object associated with the layer.

This method along with AxMap.get_Image() can be used to subtitute AxMap.get_GetObject().

Parameters:
LayerHandleThe handle of the layer.
Returns:
The reference to the shapefile or NULL reference in case of invalid handle or wrong layer type.
New API 4.8:
Added in version 4.8
Examples:
EditAttributes.cs, LabelSelection.cs, MarkPoints.cs, RemoveShape.cs, SelectBox.cs, ShowAttributes.cs, SortLayers.cs, SplitByAttribute.cs, ToolTip.cs, and ZoomToValues.cs.
bool AxMap.MoveLayer ( int  InitialPosition,
int  TargetPosition 
)

Moves a layer in the map from the initial position to a target position.

Parameters:
InitialPositionThe initial position of the layer to be moved.
TargetPositionThe final position of the layer being moved.
Returns:
bool AxMap.MoveLayerBottom ( int  InitialPosition)

Moves the specified layer below all other layers.

Parameters:
InitialPositionThe position of the layer to move to the bottom
Returns:
Boolean value representing success when true, and failure when false.
Examples:
SortLayers.cs.
bool AxMap.MoveLayerDown ( int  InitialPosition)

Moves the specified layer down one layer in the map.

Parameters:
InitialPositionThe position of the layer to be moved.
Returns:
Boolean value representing succes when true, and failure when false.
bool AxMap.MoveLayerTop ( int  InitialPosition)

Moves the specified layer to the top of all other layers.

Parameters:
InitialPositionThe position of the layer to be moved.
Returns:
Boolean value representing success when true, failure when false.
bool AxMap.MoveLayerUp ( int  InitialPosition)

Moves the specified layer up one layer in the map.

Parameters:
InitialPositionThe initial position of the layer to be moved.
Returns:
Boolean value representing success when true, failure when false.

Removes all layers from the map.

Examples:
AddLayers.cs.
void AxMap.RemoveLayer ( int  LayerHandle)

Removes the specified layer from the map.

Parameters:
LayerHandleThe handle of the layer to be removed from the map.
void AxMap.RemoveLayerWithoutClosing ( int  LayerHandle)

Removes layer from the map without its closing.

Shapefile.Close or Image.Close won't be called while removing the layer.

Parameters:
LayerHandleThe handle of the layer.
void AxMap.ReSourceLayer ( int  LayerHandle,
string  newSrcPath 
)

Changes the data source for the specified layer without its closing.

The new data source must be of the same type, i.e. either Shapefile or Image.

Parameters:
LayerHandleThe handle of the layer.
newSrcPathThe the name of the new data source.
void AxMap.set_Image ( int  LayerHandle,
Image  __p2 
)

Replaces the image object associated with the layer.

The old image will not be closed.

Parameters:
LayerHandleThe handle of the layer.
__p2The new image object.
New API 4.8:
Added in version 4.8
void AxMap.set_Shapefile ( int  LayerHandle,
Shapefile  __p2 
)

Replaces the shapefile object associated with the layer.

The old shapefile will not be closed.

Parameters:
LayerHandleThe handle of the layer.
__p2The new shapefile object.
New API 4.8:
Added in version 4.8

Properties

int AxMap.NumLayers [get, set]

Gets the number of layers loaded in the map.

Examples:
AddLayers.cs, SortLayers.cs, and SplitByAttribute.cs.
 All Classes Files Functions Enumerations Properties