コード例 #1
0
        /// <summary>${mapping_TiledCachedIServerLayer_method_initialize_D}</summary>
        public async override void Initialize()
        {
            if (base.IsInitialized)
            {
                return;
            }
            if (string.IsNullOrEmpty(this.Url))
            {
                base.Error = new ArgumentNullException(ExceptionStrings.InvalidURISchemeHost);
                base.Initialize();
                return;
            }

            if (!this.EnableGetCapabilities)
            {
                base.Initialize();
            }
            else
            {
                try
                {
                    WMSManager manager = new WMSManager(this.Url, this.Version, this.ProxyUrl);
                    manager_GetCapabilityCompleted(await manager.GetResponse());
                }
                catch (Exception ex)
                {
                    base.Error = ex;
                    base.Initialize();
                }
            }
        }
コード例 #2
0
 private void manager_GetCapabilityCompleted(WMSManager manager)
 {
     if (manager.Error != null)
     {
         base.Error = manager.Error;
         base.Initialize();
         return;
     }
     //当版本号是1.3.0时,x,y是反的;
     if (this.Version == "1.3.0" && isInRange(manager.CRS.WKID))
     {
         this.Bounds = new Rectangle2D(manager.Bounds.Bottom, manager.Bounds.Left, manager.Bounds.Top, manager.Bounds.Right);
     }
     else
     {
         this.Bounds = manager.Bounds;
     }
     this.CRS = manager.CRS;
     this.AllLayerList = manager.AllLayerList;
     this.Metadata = manager.Metadata;
     if (string.IsNullOrEmpty(this.Version))
     {
         this.Version = manager.Version;
     }
     base.Initialize();
 }
コード例 #3
0
        /// <summary>${mapping_Layer_method_initialize_D}</summary>
        public async override void Initialize()
        {
            if (isInitializing || IsInitialized)
            {
                return;
            }

            isInitializing = true;
            if (!this.EnableGetCapabilities)
            {
                base.Initialize();
            }
            else
            {
                WMSManager manager = new WMSManager(this.Url, this.Version, this.ProxyUrl);
                manager_GetCapabilityCompleted(await manager.GetResponse());
            }
        }