public async Task <bool> Handle(GetMapEventsUseCaseRequest message, IOutputPort <GetMapEventUseCaseResponse> outputPort) { var coordinate = await _mapRepository.GetAll(); outputPort.Handle(new GetMapEventUseCaseResponse(coordinate.MapEvents, null, true, "Map Event get all Complete")); return(true); }
/// <summary> /// 刷新地图 /// </summary> /// <param name="mapId">地图编号</param> /// <returns></returns> public bool RefreshMap(string mapId, string user) { var query = from a in _IMapReleationRepository.GetAll() join b in _ILayerContentRepository.GetAll() on a.DataConfigID equals b.Id join c in _IMapRepository.GetAll() on a.MapID equals c.Id where a.MapID == mapId orderby a.DataSort select new { a.Id, b.LayerAttrTable, c.MapEnName }; var query2 = from a in _IMapReleationRepository.GetAll() join b in _IDataStyleRepository.GetAll() on a.DataStyleID equals b.Id select new { a.Id, b.StyleName }; var list = query2.ToList(); List <string> targetLayers = new List <string>(); List <string> styleLayers = new List <string>(); string mapName = string.Empty; foreach (var item in query) { targetLayers.Add(item.LayerAttrTable); var style = list.Find(t => t.Id == item.Id); if (style != null) { styleLayers.Add(style.StyleName); } else { styleLayers.Add(string.Empty); } mapName = item.MapEnName; } var map = _IMapRepository.Get(mapId); GeoServerHelper geoHelp = new GeoServerHelper(); geoHelp.AddLayerGroup(mapName, targetLayers, styleLayers); geoHelp.TerminatingTask(mapName); geoHelp.TileMap(map.MapEnName); #region [生成缩略图] string strBBox = map.MinX.ToString() + "," + map.MinY.ToString() + "," + map.MaxX.ToString() + "," + map.MaxY.ToString(); GetThumbnial(map.MapEnName, strBBox); #endregion _IOperateLogAppService.WriteOperateLog(mapId, user, 1002, 1106, 1201, 1451, null); return(true); }
/// <summary> /// 验证是否有重复地图名称 /// </summary> /// <param name="name"></param> /// <returns></returns> public bool GetMapNameExist(string name) { try { var entity = _IMapRepository.GetAll().Where(q => q.MapName == name).ToList(); if (entity.Count > 0) { return(true); } else { return(false); } } catch (Exception ex) { return(false); } }
public ActionResult Index() { var maps = _mapRepository.GetAll(); return(View(maps)); }
public IEnumerable <Map> GetAllMaps() { return(Repository.GetAll()); }
public async Task <IEnumerable <Map> > GetAll() { return(await _mapRepository.GetAll()); }
public Map[] GetAllMaps() => _mapRepository.GetAll();