ThinkGeo.com    |     Documentation    |     Premium Support

Removing line shape from InMemoryFeatureLayer

Hi All,


I'm having a small issue with the removal of LineShapes from an InMemoryFeatureLayer.  The problem is after I have removed the line from the layer via code, the line is still displayed on the map.  If I zoom in/out, the line is removed, as it should be.  I also have a timer that updates the UpdatePanel the map resides in, which also removes the line.  However, if I update the panel immidiatley after removing the line (both in the same method), the line is still there.  I've also tried zooming in/out via codebehind to no avail.  Would anyone have a solution to this problem?  Thanks so much.


-Dustin



Dustin, 
  
 Did you call Overlay.Redraw() to refresh that overlay? 
  
 Ben

Wow, that was silly of me.  I was expecting to redraw the layer (for some reason), and not the overlay.  Works perfect now. Thanks for the help again, Ben.

That’s not silly, Dustin, just not very sure about Overlay and Layer. Overlay is more related to the displaying while layer is more related to the data. So whenever want to do some image updates, think more on an Overlay. :-). 
  
 Ben.