SuperMap.Connector.SpatialAnalyst.SpatialAnalyst C# (CSharp) Method

SpatialAnalyst() public method

构造函数。
参数 serviceUrl 为空时抛出异常。
public SpatialAnalyst ( string serviceUrl ) : System
serviceUrl string SuperMap iServer 空间分析服务组件的URL地址(例如:http://localhost:8090/iserver/services/transportationanalyst-sample/restjsr")。
return System
        public SpatialAnalyst(string serviceUrl)
        {
            if (string.IsNullOrEmpty(serviceUrl))
            {
                throw new ArgumentNullException("serviceUrl", "serivceUrl is null");
            }
            if (serviceUrl.Trim().EndsWith("/"))
            {
                int lastLocation = serviceUrl.LastIndexOf("/");
                if (lastLocation >= 0)
                {
                    serviceUrl = serviceUrl.Substring(0, lastLocation);
                }
            }
            this._serviceUrl = serviceUrl;
            this._spatialAnalystProvier = new SpatialAnalystProvider(this._serviceUrl);
        }