Hi
After upgrading the map control, the following code dosent work, when an layer is disabled the control dosen't
redraw the active layers.... i always calls the refresh function, if you after calling the code, is forcing the control
to redraw by panning or something like that, the map is showed again.
What have you changed?????.
if (btnShowWindFarms.Checked)
{
if (!m_windFarmsLoaded)
{
try
{
btnShowWindFarms.Enabled = false;
m_vdcService.GetWindFarmItemsAsync(0, 0, 0, 0, true);
progressControl.Visible = true;
progressControl.Start();
}
catch(Exception ex)
{
CIM.UtilUI.Message.MsgBox.Error(this, "Failed to request wind farms", ex);
}
}
}
winMap.Overlays[GetLayerName(LayerNameEnum.WindFarms)].Lock.EnterWriteLock();
try
{
InMemoryFeatureLayer pointLayer = (InMemoryFeatureLayer)winMap.FindFeatureLayer(GetLayerName(LayerNameEnum.WindFarms));
pointLayer.IsVisible = btnShowWindFarms.Checked;
}
finally
{
winMap.Overlays[GetLayerName(LayerNameEnum.WindFarms)].Lock.ExitWriteLock();
}
winMap.Refresh();