| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 | using DevExpress.Data;using DevExpress.XtraMap;using Ips.Library.Basic;using Ips.Library.DxpLib;using Ips.Sps.Store;using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace Ips.Sps.TskResults.Poses{    public class PosMapItemFactory : DefaultMapItemFactory    {        protected override void InitializeItem(MapItem item, object obj)        {            base.InitializeItem(item, obj);            var mapDot = item as MapDot;            var posObj = obj as RealTimeProxyForObject;            if (mapDot != null && posObj != null)            {                var posId = posObj.GetRowCellValue<long>(nameof(Pos.Id));                var posLon = posObj.GetRowCellValue<double>(nameof(Pos.PosLon));                mapDot.Tag = posId;                if (GeoUtil.IsValidLon(posLon))                {                    mapDot.Fill = Color.Red;                    if (posId == PosStore.Default.GridSelectPosId)                    {                        mapDot.Size = 8;                        mapDot.StrokeWidth = 3;                        mapDot.Stroke = Color.Black;                    }                    else                    {                        mapDot.Size = 6;                        mapDot.StrokeWidth = 2;                        mapDot.Stroke = Color.White;                    }                }                else                {                    mapDot.Size = 0;                }            }        }        protected override MapItem CreateItemInstance(MapItemType type, object obj)        {            return base.CreateItemInstance(type, obj);        }    }}
 |