コード例 #1
0
        //将分析后的图层叠加显示到地图上
        private void showClipInfo(string layerName, XClsType layerType, string svrAddr = "192.168.17.53:6163", string gdbSvr = "MapGisLocal", string gdbName = "IMSWebGISGDB", string usr = "", string psw = "")
        {
            this.iMSMap1.SetErrorText("");
            //设置图层访问信息
            CLayerAccessInfo layerAccessInfo = new CLayerAccessInfo();

            layerAccessInfo.GdbInfo            = new CGdbInfo();
            layerAccessInfo.GdbInfo.GDBName    = gdbName;
            layerAccessInfo.GdbInfo.GDBSvrName = gdbSvr;
            layerAccessInfo.GdbInfo.User       = usr;
            layerAccessInfo.GdbInfo.Password   = psw;
            //设置图层信息
            CLayerInfo layerInfo = new CLayerInfo();

            layerInfo.LayerDataName          = layerName;
            layerInfo.LayerType              = layerType;
            layerInfo.GeomType               = SFclsGeomType.Reg;
            layerAccessInfo.LayerInfoList    = new CLayerInfo[1];
            layerAccessInfo.LayerInfoList[0] = layerInfo;
            //设置要叠加打开的图层信息
            COpenLayer openLayer = new COpenLayer();

            openLayer.LayerAccessInfo    = new CLayerAccessInfo[1];
            openLayer.LayerAccessInfo[0] = layerAccessInfo;
            this._vLayer = new VectorLayer();
            this.iMSMap1.AddChild(this._vLayer);
            this._vLayer.ServerAddress = svrAddr;
            this._vLayer.LayerObj      = openLayer;
            //加载裁剪分析后的图层
            this._vLayer.LoadLayer(openLayer, new UploadStringCompletedEventHandler(onSingleLayerLoad));
        }
コード例 #2
0
 //缓冲分析后的图层显示函数
 private void showBufferInfo(string layerName, XClsType layerType, string svrAddr = "127.0.0.1", string gdbSvr = "MapGisLocal", string gdbName = "IMSWebGISGDB", string usr = "", string psw = "")
 {
     if (this.successFlag == false)
     {
         //图层访问信息类
         CLayerAccessInfo layerAccessInfo = new CLayerAccessInfo();
         //gdb信息类
         layerAccessInfo.GdbInfo            = new CGdbInfo();
         layerAccessInfo.GdbInfo.GDBName    = gdbName;
         layerAccessInfo.GdbInfo.GDBSvrName = gdbSvr;
         layerAccessInfo.GdbInfo.User       = usr;
         layerAccessInfo.GdbInfo.Password   = psw;
         //图层信息类
         CLayerInfo layerInfo = new CLayerInfo();
         layerInfo.LayerDataName          = layerName;
         layerInfo.LayerType              = layerType;
         layerInfo.GeomType               = SFclsGeomType.Reg;
         layerAccessInfo.LayerInfoList    = new CLayerInfo[1];
         layerAccessInfo.LayerInfoList[0] = layerInfo;
         //设置要叠加打开的图层信息
         COpenLayer openLayer = new COpenLayer();
         openLayer.LayerAccessInfo    = new CLayerAccessInfo[1];
         openLayer.LayerAccessInfo[0] = layerAccessInfo;
         //实例化矢量图层
         this._vLayer = new VectorLayer();
         this.iMSMap1.AddChild(this._vLayer);
         this._vLayer.ServerAddress = svrAddr;
         this._vLayer.LayerObj      = openLayer;
         //加载缓冲分析后的图层
         this._vLayer.LoadLayer(openLayer, new UploadStringCompletedEventHandler(onSingleLayerLoad));
     }
 }
コード例 #3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="layerName"></param>
        /// <param name="layerType"></param>
        /// <param name="svrAddr"></param>
        /// <param name="gdbSvr"></param>
        /// <param name="gdbName"></param>
        /// <param name="usr"></param>
        /// <param name="psw"></param>
        public void ShowLayerAttRecord(string layerName, XClsType layerType, string svrAddr = "127.0.0.1", string gdbSvr = "MapGisLocal", string gdbName = "IMSWebGISGDB", string usr = "", string psw = "")
        {
            CLayerAccessInfo layerAccessInfo = new CLayerAccessInfo();

            layerAccessInfo.GdbInfo            = new CGdbInfo();
            layerAccessInfo.GdbInfo.GDBName    = gdbName;
            layerAccessInfo.GdbInfo.GDBSvrName = gdbSvr;
            layerAccessInfo.GdbInfo.User       = usr;
            layerAccessInfo.GdbInfo.Password   = psw;
            CLayerInfo layerInfo = new CLayerInfo();

            layerInfo.LayerDataName          = layerName;
            layerInfo.LayerType              = layerType;
            layerInfo.GeomType               = SFclsGeomType.Reg;
            layerAccessInfo.LayerInfoList    = new CLayerInfo[1];
            layerAccessInfo.LayerInfoList[0] = layerInfo;
            COpenLayer openLayer = new COpenLayer();

            openLayer.LayerAccessInfo    = new CLayerAccessInfo[1];
            openLayer.LayerAccessInfo[0] = layerAccessInfo;
            this._vLayer = new VectorLayer();
            this._vLayer.ServerAddress = svrAddr;
            this._vLayer.LayerObj      = openLayer;
            m_catalog.MapContainer.AddChild(this._vLayer);
            // this._vLayer.AddedToMapContainerCallback += new AddedToMapContainerDelegate(AddToContainer);
            this._vLayer.LayerOpenSuccEvent += new LayerOpenSuccEventHandler(_vLayer_LayerOpenSuccEvent);
        }