I have five layers: polygon, line, and point with a single IRasterLayer file. I am programmatically setting the ILayer.Visible attribute for the Raster but the layer is not refreshing. If I zoom in, or zoom out, then it refreshes properly.

I tried these two methods:

mapControl.Refresh(esriViewDrawPhase.esriViewAll, null, null); 

But they didn't refresh my map. What method is stronger that this for refreshing the entire map?


Apparently mapcontrol.ActiveView.Refresh() is more reliable.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.