Hi,
I created the function GetMapImage() based on the sample codes provided. It works very well with one client application. But now when I test my web server with two clients and when I pan the maps almost simultaneously, an exception is raised and my client program crashes. I found out that the crash happens when the function MapEngine.DrawStaticLayers() is called
Here is my code:
try
{
mapEngine.OpenAllLayers();
lock (mapEngine)
{
mapEngine.DrawStaticLayers(bitmap, GeographyUnit.Meter);
}
mapEngine.CloseAllLayers();
}
catch (Exception ex)
{
string strTest = "";
strTest = "SOMETHING IS WRONG";
}
The error in the stack is “The Layer must be opened before you can perform this method.
What does it mean by that? I suppose all layers are opened when OpenAllLayers() is called.
Thanks!