Example #1
0
        public void ProcessRequest(HttpContext context)
        {
            try
            {
                HttpRequest request = context.Request;
                Uri         uri     = request.Url;
                string      url;
                string      absoluteUri = uri.AbsoluteUri;
                if (uri.Query.Length > 0)
                {
                    string s = absoluteUri.Replace(uri.Query, String.Empty);
                    url = s;
                }
                else
                {
                    url = absoluteUri;
                }

                Map map = MapHelper.InitializeMap();
                Capabilities.WmsServiceDescription description = GetDescription(url);
                WmsServer.ParseQueryString(map, description);
            }
            catch (Exception ex)
            {
                Trace.WriteLine(ex);
                throw;
            }
        }
Example #2
0
        /// <summary>
        ///     Prepares the response.
        /// </summary>
        public void ProcessRequest(string url)
        {
            var map         = GetMap();
            var description = GetDescription(url);

            WmsServer.ParseQueryString(map, description);
        }
Example #3
0
        public override void ProcessRequest(IContext context)
        {
            string url = GetFixedUrl(context.Request);

            Capabilities.WmsServiceDescription description = GetDescription(url);
            Map map = GetMap(context.Request);

            WmsServer.ParseQueryString(map, description, 10, null, context);
        }
Example #4
0
 public override void ProcessRequest(HttpContext context)
 {
     try
     {
         var request     = context.Request;
         var url         = this.GetFixedUrl(request);
         var description = this.GetDescription(url);
         var map         = this.GetMap(request);
         WmsServer.ParseQueryString(map, description, 10, null, context);
     }
     catch (Exception ex)
     {
         Trace.WriteLine(ex);
         throw;
     }
 }
Example #5
0
 public override void ProcessRequest(HttpContext context)
 {
     try
     {
         HttpRequest request = context.Request;
         string      url     = GetFixedUrl(request);
         Capabilities.WmsServiceDescription description = GetDescription(url);
         Map map = this.GetMap(request);
         WmsServer.ParseQueryString(map, description, 10, null);
     }
     catch (Exception ex)
     {
         Trace.WriteLine(ex);
         throw;
     }
 }
Example #6
0
        public void ProcessRequest(HttpContext context)
        {
            try
            {
                HttpRequest request = context.Request;
                Uri         uri     = request.Url;
                string      url;
                string      absoluteUri = uri.AbsoluteUri;
                if (uri.Query.Length > 0)
                {
                    string s = absoluteUri.Replace(uri.Query, String.Empty);
                    url = s;
                }
                else
                {
                    url = absoluteUri;
                }
                Capabilities.WmsServiceDescription description = GetDescription(url);

                Map    map;
                string type = request.Params["MAP_TYPE"];
                if (String.Equals(type, "OL", StringComparison.InvariantCultureIgnoreCase))
                {
                    map = MapHelper.OpenLayers();
                }
                else if (String.Equals(type, "PM", StringComparison.InvariantCultureIgnoreCase))
                {
                    map = MapHelper.PolyMaps();
                }
                else
                {
                    string format = String.Format("unsupported map type: '{0}'", type);
                    throw new NotSupportedException(format);
                }
                WmsServer.ParseQueryString(map, description);
            }
            catch (Exception ex)
            {
                Trace.WriteLine(ex);
                throw;
            }
        }