Beispiel #1
0
 private void DrawLine(MapPointEx[] arrPoint)
 {
     if (arrPoint != null && arrPoint.Length > 1)
     {
         mapLayer.DrawPolyLine(arrPoint.ToList(), new I_GS_MapBase.Portal.SymbolElement("track")
         {
             ControlTemplate = Obj.screenMap.MainMap.Resources["TrackLine"],
             DataSources = new List<KeyValuePair<string, object>>{ 
                 new KeyValuePair<string,object>("Visibled","Visible"),
             }                   
         });
         ClientUtile client = ClientUtile.Create();
         double angle = client.GetAzimuthAngle(arrPoint[1].X, arrPoint[1].Y, arrPoint[0].X, arrPoint[0].Y);
         PointEx pNew = client.GetRelativePoint(new PointEx(arrPoint[1].X, arrPoint[1].Y),angle,2);
         mapLayer.DrawArrow(new List<MapPointEx>() { Obj.screenMap.GetMapPointEx(pNew.X,pNew.Y), arrPoint[1] }, new I_GS_MapBase.Portal.SymbolElement("track")
         {
             DataSources = new List<KeyValuePair<string, object>>{ 
                 new KeyValuePair<string,object>(GraphicStyle.ArrowSize.ToString(),"10"),
                 new KeyValuePair<string,object>(GraphicStyle.ArrowColor.ToString(),"Green"),
             }
         });
     }
 }