public void initInfo() { if (mark == null) { mark = new addMarks(); mark.graphicsLayer = this.graphicsLayer; mark.markLayer1 = this.markLayer; mark.mapContainer = this.mapContainer; } #region 废弃 //warnMark = new GIFToolTip(); //warnMark.Addtip(markInfo); //IMSMark markPnt = new IMSMark(warnMark, CoordinateType.Logic) { EnableAnimation = false }; //Point pn = new Point(markInfo.X, markInfo.Y); ////pn = logicPnt; //pn = this.mapContainer.LogicToScreen(pn.X, pn.Y); //pn.X = pn.X - 11; //- 17; //pn.Y = pn.Y - 11; //- 44; //pn = this.mapContainer.ScreenToLogic(pn.X, pn.Y); //markPnt.X = pn.X; //markPnt.Y = pn.Y; //this.mapContainer.SetCenter(markInfo.X, markInfo.Y); //// markLayer1.ManuallyAddMarkObj = markPnt; //this.markLayer.AddMark(markPnt); #endregion pntStr = CenterMarketInfo.X + "," + CenterMarketInfo.Y + "," + markInfo.X + "," + markInfo.Y + ","; this.StateNameTextBox.Text = markInfo.MarketName; this.grid.DataSource = orders; }
/// <summary> /// 圆查询回调 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void ServiceClient_SsarchByCircleCompleted(object sender, SearchByCircleCompletedEventArgs e) { if (first) { first = false; if (e.Error == null) { if (e.Result != "") { string tmp = e.Result; string[] str = tmp.Split(';'); if (str[0] == "无信息!") { MessageBox.Show("所选区域没有门店"); return; } else { MarketList = XMLSerialization.Desrialize(MarketList, str[0]); this.markLayer.RemoveAll(); addMarkList = new List <IMSMark>(); addMarks marks = new addMarks(); marks.markLayer1 = this.markLayer; marks.markets = MarketList; marks.mapContainer = this.mapContainer; addMarkList = marks.AddMarks(); if (str[1] != "无信息") { _prodects = XMLSerialization.Desrialize(_prodects, str[1]); } if (str[2] != "无信息") { _fincials = XMLSerialization.Desrialize(_fincials, str[2]); } this.Show(); } } } } }
void ServiceClient_addDataCompleted(object sender, addDataCompletedEventArgs e) { ServiceClient.addDataCompleted -= ServiceClient_addDataCompleted; if (e.Error == null) { MessageBox.Show(e.Result); if (Type == "marketsInfo") { //移除临时标注 bool f = this.markLayer.RemoveMark(tmp); if (AddMarkControl == null) { AddMarkControl = new addMarks(); AddMarkControl.markLayer1 = this.markLayer; AddMarkControl.mapContainer = this.mapContainer; } tmp = AddMarkControl.AddMark(_marketsInfo); this.markLayer.MapContainer.Refresh(); } } }