Пример #1
0
        public void GetWmsMosaic(ParamWmsGetMap param)
        {
            MReader reader = new MReader(Config.CONN_BING, "BEST_AVAILABLE", debugMode, 0, 0, 50);

            resultAsBytes = reader.GetBingMosaic(param.width, param.height, param.top, param.right, param.bottom, param.left);
            logString     = reader.logString;
        }
Пример #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     SafeRunPrintError(delegate
     {
         string service = "getcapabilities";
         if (Request["bbox"] != null)
         {
             service = "getmap";
         }
         if (Request["request"] != null)
         {
             service = Request["request"].ToLower();
         }
         if (service == "getcapabilities")
         {
             OutputXml(capabilitiesString);
         }
         else if (service == "getmap")
         {
             ParamWmsGetMap param = new ParamWmsGetMap(Request);
             try
             {
                 Reader reader = new Reader(param.debug);
                 reader.GetWmsMosaic(param);
                 if (!param.debug)
                 {
                     OutputImage(reader.resultAsBytes, tileSize);
                 }
                 else
                 {
                     OutputText(reader.logString);
                 }
             }
             catch (Exception ex)
             {
                 if (!param.debug)
                 {
                     OutputBlackTile(tileSize);
                 }
                 else
                 {
                     OutputText(ex.Message);
                 }
                 Log("wms_get_map", ex);
             }
         }
         else
         {
             throw new Exception("Parameter request is not recognized");
         }
     });
 }