This project has moved. For the latest updates, please go here.

Clear map child objects

Oct 17, 2014 at 7:25 AM
Before an XAML Map Control update the statement
map.Children.Clear();
yuse to work and clear non TileLayer map objects.
Now when I use map.Children.Clear(); it clears the TileLayer, use there a way of clearing the map.Children with out checking each object type?
Coordinator
Oct 17, 2014 at 8:13 AM
map.Children.RemoveRange(1, map.Children.Count - 1);
Oct 17, 2014 at 8:21 AM
Thanks Clemens, didn't release the TileLayer was the first object :doh:.

At this point I would like to congratulate you on your hard work implementing this truly excellent control.

kudos.
Coordinator
Oct 22, 2014 at 8:30 AM
Forgot to mention that you could as well put all your dynamic child elements into a separate MapPanel.
Oct 23, 2014 at 9:04 AM
Thanks for the tip, I'll give it a try.