Hi, I'm using GeoRSSLayer and I dynamically change the Source URI at runtime. I'm trying to capture when the Graphics.CollectionChanged. But it's not working. Here is my code:On page load:GeoRssLayer rssLayer = map1.Layers["GeoRSSLayer"] as GeoRssLayer; rssLayer.Graphics.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(Graphics_CollectionChanged);
In button click event:GeoRssLayer rssLayer = map1.Layers["GeoRSSLayer"] as GeoRssLayer; rssLayer.ClearGraphics(); rssLayer.Source = new Uri(source); // source is a new feed url rssLayer.Update();
Unfortunately, even though the graphics get updated successfully (I can watch during debug they go from 20 to 0, to 20, to 0, etc). the CollectionChanged event NEVER fires. I need to call ZoomTo method after the graphics layer is updated to zoom in wherever graphics are. If you have any other suggestions on how to perform a ZoomTo after the Source URI changes on a GeoRSSLayer that would work. Of course I can't just simply call ZoomTo in my code after I set the Source because it's asynchronous and I don't see any Completed type events on the GeoRSSLayer to know when it's done loading. void Graphics_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) { GeoRssLayer rssLayer = map1.Layers["GeoRSSLayer"] as GeoRssLayer; map1.ZoomTo(rssLayer.FullExtent); }