laptop and a wrench

Bug

The visibility of layers in IMapDescription gets corrupted after setting the extent in IMapDescription and calling the applyMapDescription method.

Last Published: February 10, 2015 No Product Found
Bug ID Number NIM006436
SubmittedJanuary 29, 2007
Last ModifiedJune 5, 2024
Applies toNo Product Found
Version found9.2
Version Fixed9.3
StatusFixed

Additional Information

No Public Explanation

Workaround

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

Steps to Reproduce

Bug ID: NIM006436

Software:

  • No Product Found

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options