public void LoadAreaInMap() { List <AreaInfo> areaItems = new List <AreaInfo>(); try { AreaGetListRequest areaGetListRequest = new AreaGetListRequest(); var result = areaService.GetAllAreaList(areaGetListRequest); if (result.Data != null && result.IsSuccess) { areaItems = result.Data.OrderBy(a => a.Areaname).ToList(); } if (areaItems.Count > 0) { foreach (AreaInfo area in areaItems) { if (string.IsNullOrEmpty(area.AreaBound)) { continue; } GraphOpt.DoDrawinggGraphicsAndName(mx, area.AreaBound.Split('|')[0], "polyline", area.Areaname, area.Areaid); } } } catch (Exception ex) { MessageBox.Show("LoadArea Error:" + ex.Message); } }
private void barButtonItem5_ItemClick_1(object sender, ItemClickEventArgs e) { string AreaString = "[{\"pointX\":25942.022463,\"pointY\":-11007.051129},{\"pointX\":27314.093073,\"pointY\":-13410.25359},{\"pointX\":25559.505809,\"pointY\":-14424.754283},{\"pointX\":24461.849321,\"pointY\":-12470.593112}]"; string type = "polygon"; string AreaName = "101305工作面掘进巷道"; GraphOpt.DoDrawinggGraphicsAndName(mx, AreaString, type, AreaName, ""); }