using HL_FristAidPlatform_RealTimeVideo; using System; using System.ComponentModel; using System.Data; using System.Drawing; using System.Windows.Forms; using HL_FristAidPlatform_Public; namespace HL_FristAidPlatform_PreHospitalEmergency { public partial class Form_Map : Form { private WebMap wm = null; string endAddress = ""; M_CarGPS m_CarGPS = new M_CarGPS(); public Form_Map(string _endAddress) { InitializeComponent(); wm = WebMap.Instance; endAddress = _endAddress; } private void Form_Main_Load(object sender, EventArgs e) { wm.WebBrowser1 = webBrowser1; wm.EnableMouseDrag(); #region 赋予默认值信息 //根据医院ID获取到经纬度 string Url = string.Format("api/base/T_Base_Hospital/GetByGuid?guid={0}", Information.Hospital.GUID); DataTable HospitalDT = DBHelpClass.Get(Url); if (HospitalDT != null && HospitalDT.Rows.Count > 0) { //根据默认急救车编号获取到急救车牌号和设备ID string DefaultAmbulanceGuid = PublicClass.ToString(HospitalDT.Rows[0]["DefaultAmbulanceGuid"], ""); if (!string.IsNullOrEmpty(DefaultAmbulanceGuid)) { DataTable AmbulanceDT = DBHelpClass.GetJsonText(string.Format("/api/base/T_Base_Ambulance/GetGPSInfoByGuid?guid={0}", DefaultAmbulanceGuid)); if (AmbulanceDT != null && AmbulanceDT.Rows.Count > 0) { m_CarGPS.ambulanceNumber = AmbulanceDT.Rows[0]["PlateNumber"].ToString(); m_CarGPS.deviceId = AmbulanceDT.Rows[0]["EquipmentCode"].ToString(); string x = HospitalDT.Rows[0]["Longitude"].ToString();//经度 string y = HospitalDT.Rows[0]["Latitude"].ToString();//纬度 m_CarGPS.lpX = x;//经度 m_CarGPS.lpY = y;//纬度 } } } #endregion wm.LoadDefaultUrl(m_CarGPS); wm.GetNavigation(m_CarGPS.lpX, m_CarGPS.lpY, endAddress); ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(Form_FirstAidTrack)); AutoScaleDimensions = new SizeF(6f, 12f); AutoScaleMode = AutoScaleMode.Font; ClientSize = new Size(1046, 650); Name = "120调度地图"; Text = "120调度地图"; } private void Form_Map_FormClosed(object sender, FormClosedEventArgs e) { this.Dispose(); } } }