The visibility of layers in IMapDescription gets corrupted after setting the extent in IMapDescription and calling the applyMapDescription method.
上次发布: February 10, 2015No Product Found
漏洞 ID 编号
NIM006436
已提交
January 29, 2007
上次修改时间
June 5, 2024
适用范围
No Product Found
找到的版本
9.2
修正版本
9.3
状态
Fixed
此漏洞已得到修复。 有关详细信息,请参阅“版本修复”和“其他信息”(如果适用)。
附加信息
No Public Explanation
解决办法
IMapServerObjects.RefreshSererObjects() function must be called twice to solve this particular problem.Here is the portion of code that fails at 9.2: //make the current map the same as the old map mapcurrent.clearLayers(); mapcurrent.clearMapSurrounds(); for(int i = originalMap.getLayerCount()-1 ; i >= 0 ; --i) mapcurrent.addLayer(originalMap.getLayer(i)); ((MapServer)server).refreshServerObjects();Here is the workaround solution: //making the current mapcurrent.ClearLayers(); mapcurrent.ClearMapSurrounds(); ((MapServer)server).RefreshServerObjects(); // refreshServerObject for (int i = originalMap.getLayerCount() - 1; i >= 0; --i) mapcurrent.AddLayer(originalMap.getLayer(i)); ((MapServer)server).RefreshServerObjects(); // refreshServerObject again