This project is read-only.

Remove Raster Layer

Apr 5, 2013 at 2:12 PM
Hi, I have a problem removing a layer (raster) map with

Map1.Layers.Remove(lyr)

and that is, the layer is captured by the map and you can not delete the file but rather before the application closes.

I tried to test with,

lyr.Dispose()
lyr = Nothing
Map1.Refresh()
Map1.ResetBuffer()
Map1.Invalidate()

but nothing works, and the file still remains captured until I close the application.

Thanks, Claudio
Apr 7, 2013 at 6:27 PM
Please supply some more information.

I think you are saying that the layer is removed from the Map OK, but then the file is still locked. Is that right?
Apr 8, 2013 at 11:30 AM
Thanks for your answer.

Yes, it's exactly what I mean, the file is still locked until the application is closed.

Claudio