namespace HStation.WinFrmUI
|
{
|
public partial class XhsProjectResultMapCtrl : DevExpress.XtraEditors.XtraUserControl
|
{
|
public XhsProjectResultMapCtrl()
|
{
|
InitializeComponent();
|
this.mapViewMarkerContainer1.LoadCompletedEvent += MapViewMarkerContainer1_LoadCompletedEvent;
|
}
|
|
private ImportXhsProjectViewModel _vm = null;//操作对象
|
|
/// <summary>
|
/// 绑定数据
|
/// </summary>
|
public async void SetBindingData(ImportXhsProjectViewModel vm)
|
{
|
if (vm == null)
|
{
|
return;
|
}
|
_vm = vm;
|
await this.mapViewMarkerContainer1.InitialContainer();
|
}
|
|
//加载完成
|
private async void MapViewMarkerContainer1_LoadCompletedEvent()
|
{
|
if (_vm == null)
|
{
|
return;
|
}
|
if (_vm.MapInfo == null)
|
{
|
return;
|
}
|
var marker = Yw.Model.Map.Marker.ToModel(_vm.MapInfo.Position);
|
await this.mapViewMarkerContainer1.LoadMarker(marker);
|
}
|
|
}
|
}
|