/// <summary>${mapping_TiledCachedIServerLayer_method_initialize_D}</summary> public override void Initialize() { if (base.IsInitialized) { return; } if (string.IsNullOrEmpty(this.Url)) { base.Error = new ArgumentNullException(ExceptionStrings.InvalidURISchemeHost); base.Initialize(); return; } if (!Url.Contains("http://")) //相对地址 { var pageUrl = System.Windows.Browser.HtmlPage.Document.DocumentUri; var localUrl = pageUrl.AbsoluteUri.Substring(0, pageUrl.AbsoluteUri.IndexOf(pageUrl.AbsolutePath)); Url = localUrl + Url; } if (!this.EnableGetCapabilities) { base.Initialize(); } else { WMSManager manager = new WMSManager(this.Url, this.Version, this.ProxyUrl); manager.GetCapabilityCompleted += new EventHandler<EventArgs>(manager_GetCapabilityCompleted); } }
/// <summary>${mapping_Layer_method_initialize_D}</summary> public override void Initialize() { if (isInitializing || IsInitialized) { return; } if (!Url.Contains("http://")) //相对地址 { var pageUrl = System.Windows.Browser.HtmlPage.Document.DocumentUri; var localUrl = pageUrl.AbsoluteUri.Substring(0, pageUrl.AbsoluteUri.IndexOf(pageUrl.AbsolutePath)); Url = localUrl + Url; } isInitializing = true; if (!this.EnableGetCapabilities) { base.Initialize(); } else { WMSManager manager = new WMSManager(this.Url, this.Version, this.ProxyUrl); manager.GetCapabilityCompleted += new EventHandler<EventArgs>(manager_GetCapabilityCompleted); } }