"Map Exception" error while Map cloning in MapXtreme .NET

Products affected: MapXtreme .NET
 

Issue

When using MapXtreme .NET v7.2.0 the following error is encountered when Map cloning:

Map Exception

Cause

The Custom Layer is derived from FeatureLayer and, internally, this is derived from ISerializable. In both cases LayerControlDialog::OnLoad() is called and this Onload() method calls Map.Clone(). 

The Clone() method carries out Serialization/DeSerialization of the map. Therefore, for the CustomLayer to work correctly, you have to mark this as Serialization as well.

The reason that you see different behavior between the two operations is because the Exceptions are handled in different ways internally.

 

Resolution

UPDATED: March 31, 2020
The child class of the FeatureLayer should be marked as Serialization.