private void loader_LoadFailed(object sender, GeoRssLoader.RssLoadFailedEventArgs e) { this.InitializationFailure = e.ex; if (!IsInitialized) base.Initialize(); }
/// <summary> /// Initializes a new instance of the <see cref="GeoRssLayer"/> class. /// </summary> public GeoRssLayer() : base() { loader = new GeoRssLoader(); loader.LoadCompleted += loader_LoadCompleted; loader.LoadFailed += loader_LoadFailed; }
private void loader_LoadCompleted(object sender, GeoRssLoader.RssLoadedEventArgs e) { this.Graphics = new GraphicCollection(e.Graphics); // GeoRSS-Simple requires geometries in WGS84 hence; setting layer Spatial Reference to 4326: this.SpatialReference = new Geometry.SpatialReference(4326); if(!IsInitialized) base.Initialize(); }