Functions
Map serialization
Map modules

Functions

bool AxMap.DeserializeLayer (int LayerHandle, string newVal)
 Restores the state of the layer from the string generated by AxMap.SerializeLayer().
bool AxMap.DeserializeMapState (string State, bool LoadLayers, string BasePath)
 Restores map state from the string generated by AxMap.SerializeMapState.
bool AxMap.LoadLayerOptions (int LayerHandle, string OptionsName, ref string Description)
 Applies to the layer a set of settings from file with the specified name.
bool AxMap.LoadMapState (string Filename, object Callback)
 Loads the state of the map from the file created by AxMap.SaveMapState method.
bool AxMap.RemoveLayerOptions (int LayerHandle, string OptionsName)
 Removes set of options for the layer with the specified name.
bool AxMap.SaveLayerOptions (int LayerHandle, string OptionsName, bool Overwrite, string Description)
 Saves settings of the layer to the file.
bool AxMap.SaveMapState (string Filename, bool RelativePaths, bool Overwrite)
 Saves the state of the map to the specified file.
string AxMap.SerializeLayer (int LayerHandle)
 Serializes the layer settings to the string.
string AxMap.SerializeMapState (bool RelativePaths, string BasePath)
 Serializes map state to the string.

Detailed Description

Here is a list of properties and methods to preserve the state of the map and particular layers. This module is a part of the documentation of AxMap class.

dot_inline_dotgraph_4.png

Graph description


Function Documentation

bool AxMap.DeserializeLayer ( int  LayerHandle,
string  newVal 
)

Restores the state of the layer from the string generated by AxMap.SerializeLayer().

Parameters:
LayerHandleThe handle of the layer.
newValThe string to restore values from.
Returns:
True on success and false otherwise.
New API 4.8:
Added in version 4.8
bool AxMap.DeserializeMapState ( string  State,
bool  LoadLayers,
string  BasePath 
)

Restores map state from the string generated by AxMap.SerializeMapState.

This method will remove all the existing layers and load the layers specified in the string.

Parameters:
StateThe string with serialized state.
LoadLayersA boolean value which indicates whether layers or only options of the map control will restored.
BasePathThe path to the base folder starting from which relative paths were calculated.
Returns:
True on success and false otherwise.
New API 4.8:
Added in version 4.8
bool AxMap.LoadLayerOptions ( int  LayerHandle,
string  OptionsName,
ref string  Description 
)

Applies to the layer a set of settings from file with the specified name.

The options will be loaded from the file with the name [LayerName].[OptionsName].mwsymb

Parameters:
LayerHandleThe handle of the layer.
OptionsNameThe name of the set of options.
DescriptionThe output string which will hold the description of the options stored in file.
Returns:
True on success and false otherwise.
New API 4.8:
Added in version 4.8
Examples:
AddCategoryRange.cs.
bool AxMap.LoadMapState ( string  Filename,
object  Callback 
)

Loads the state of the map from the file created by AxMap.SaveMapState method.

Parameters:
FilenameThe name of the file.
CallbackA callback object to return information about progress and errors.
Returns:
True on success and false otherwise.
New API 4.8:
Added in version 4.8
bool AxMap.RemoveLayerOptions ( int  LayerHandle,
string  OptionsName 
)

Removes set of options for the layer with the specified name.

The options are stored in files with the name [LayerName].[OptionsName].mwsymb

Parameters:
LayerHandleThe handle of the layer.
OptionsNameThe name of the set of options.
Returns:
True on success and false otherwise.
New API 4.8:
Added in version 4.8
bool AxMap.SaveLayerOptions ( int  LayerHandle,
string  OptionsName,
bool  Overwrite,
string  Description 
)

Saves settings of the layer to the file.

The options are saved to the file with name [LayerName].[OptionsName].mwsymb

Parameters:
LayerHandleThe handle of the layer.
OptionsNameThe name which will be attached to the set of options.
OverwriteA value which indicates whether the existing file will be overwritten.
DescriptionThe description associated with the set of options.
Returns:
True on success and false otherwise.
New API 4.8:
Added in version 4.8
Examples:
AddCategoryRange.cs.
bool AxMap.SaveMapState ( string  Filename,
bool  RelativePaths,
bool  Overwrite 
)

Saves the state of the map to the specified file.

Use AxMap.LoadState for reverse operation. The serialized state include:

  • properties of the control;
  • references to the layers;
  • drawing options for the layers.
Parameters:
FilenameThe name of the file.
RelativePathsA value which indicates whether absolute or relative paths should be used.
OverwriteA value which indicates whether the exiting file will be overwritten.
Returns:
True on success and false otherwise.
New API 4.8:
Added in version 4.8
string AxMap.SerializeLayer ( int  LayerHandle)

Serializes the layer settings to the string.

The serialized string will not include information about the data source. Therefore the same options can later be applied to any data layer of the same type (either shapefile or image).

Parameters:
LayerHandleThe handle of the layer.
Returns:
The string with serialized layer settings.
New API 4.8:
Added in version 4.8
string AxMap.SerializeMapState ( bool  RelativePaths,
string  BasePath 
)

Serializes map state to the string.

Parameters:
RelativePathsA value which indicates whether relative or absolute paths to data sources will be used.
BasePathThe path to the base folder starting from which relative paths will be calculated.
Returns:
The string with the serialized map state.
New API 4.8:
Added in version 4.8
 All Classes Files Functions Enumerations Properties Events