public ActionResult FiberPoints(string vendorName, decimal bottomLeftLat, decimal bottomLeftLng, decimal topRightLat, decimal topRightLng, int zoom, bool pretty = false) { MainFactory.getLogSvc().logAction("Vendor Fiber " + vendorName); PathMgr pathMgr = new PathMgr(LocationFactory.createPath(vendorName.Equals("level3") ? BuildingType.PATH_DB : BuildingType.PATH_GIS)); IList<Line> lineList = pathMgr.getPoints(vendorName, bottomLeftLat, bottomLeftLng, topRightLat, topRightLng, zoom); ContentResult jsonResult = Jsonify<IList<Line>>.Serialize(lineList, pretty); return jsonResult; }
/// <summary> /// The controller for the index page. Retrieves a list of states and providers and returns model to view /// </summary> /// <returns>The Index view with the model</returns> public ViewResult Index() { logger.logAction("Index Access"); ViewBag.Message = "Planning Map"; //IRegion stateThread = ReferenceFactory.get("states"); //IRegion providerThread = ReferenceFactory.get("providers"); PathMgr pathMgr = new PathMgr(LocationFactory.createPath(BuildingType.PATH_GIS)); IPolygonSvc msoSvc = LocationFactory.createShape(ShapeType.MSO); IList<ICoordShape> cableVendors = msoSvc.getPolygons(); Dictionary<string, string> fiberLinks = getFiberVendors(pathMgr); ViewData["fiberVendors"] = fiberLinks; ViewData["msoVendors"] = cableVendors; //IndexModel model = new IndexModel(stateThread.getData(), null); return View(); }
private Dictionary<string, string> getFiberVendors(PathMgr pathMgr) { Dictionary<string, string> fiberLinks = new Dictionary<string, string>(); foreach (string vendor in pathMgr.getVendorNames()) fiberLinks.Add(vendor, pathMgr.getVendorColorHex(vendor)); return fiberLinks; }