示例#1
0
 public JsonResult GetCoveragePoints(string fieldName,
     StatValueFieldRepository repository, CoverageStatChart chart)
 {
     StatValueField field = repository.GenerateDefaultField(fieldName);
     return Json(chart.StatList.Select(x => new
     {
         X = x.Longtitute + GeoMath.BaiduLongtituteOffset,
         Y = x.Lattitute + GeoMath.BaiduLattituteOffset,
         C = field.GetColor(fieldName == "信号RSRP" ? x.Rsrp : x.Sinr, "FFFFFF")
     }), JsonRequestBehavior.AllowGet);
 }
示例#2
0
 public JsonResult GetStatValueField(StatValueFieldRepository repository,
     string fieldName)
 {
     StatValueField field = repository.GenerateDefaultField(fieldName);
     return Json(field.IntervalList.Select(x => new
     {
         L = x.IntervalLowLevel,
         H = x.IntervalUpLevel,
         C = x.Color.ColorStringForHtml,
         K = x.Color.ColorStringForKml
     }).ToArray(),
     JsonRequestBehavior.AllowGet);
 }
示例#3
0
 public ActionResult ExportPoints(string fieldName, StatValueFieldRepository repository,
     CoverageStatChart chart)
 {
     if (chart.StatList.Count == 0)
     {
         TempData["warning"] = "覆盖数据为空,请先导入数据分析。";
         return RedirectToAction("CoverageImport");
     }
     StatValueField field = repository.GenerateDefaultField(fieldName);
     TempData["centerX"] = chart.StatList.Average(x=>x.BaiduLongtitute);
     TempData["centerY"] = chart.StatList.Average(x=>x.BaiduLattitute);
     return View(field);
 }