Esempio n. 1
0
 public void Clear()
 {
     if (Drawing)
         return;
     if (mapLayer != null)
     {
         mapLayer.ClearSymbolElements();
         mapLayer.ClearSlElements();
         points.Clear();
     }
 }
Esempio n. 2
0
        //public DrawTrack(UserControl uc)
        //{
        //    closeButton = new ClearButton(uc);
        //    mapLayer = Obj.screenMap.MainMap.CreateMapLayer();
        //    closeButton.button.Click += (m, n) =>
        //    {
        //        Clear();
        //    };
        //    Reset();
        //}
      
        //~DrawTrack()
        //{
        //    if(mapLayer!=null)
        //        Obj.screenMap.MainMap.RemoveMapLayer(mapLayer.Id);
        //}
        public void Reset(UserControl uc=null)
        {
            points.Clear();
            if (mapLayer != null)
            {
                Obj.screenMap.MainMap.RemoveMapLayer(mapLayer.Id);                
            }
            mapLayer = Obj.screenMap.MainMap.CreateMapLayer();
            mapLayer.ClearSymbolElements();
            mapLayer.ClearSlElements();

            closeButton = new ClearButton(uc);

            closeButton.button.Click += (m, n) =>
            {
                Clear();
            };
            
        }