Beispiel #1
0
        public void ClearRouteAnalyst(AxMapControl mapControl)
        {
            //清除所有图标
            SymbolUtil.ClearElement(mapControl);
            stopPoints.Clear();
            barryPoints.Clear();
            barryElements.Clear();
            stopElements.Clear();
            //清除网络分析图层
            for (int i = 0; i < mapControl.LayerCount; i++)
            {
                ILayer        layer        = mapControl.get_Layer(i);
                INetworkLayer networkLayer = layer as INetworkLayer;
                INALayer      naLayer      = layer as INALayer;
                if (networkLayer != null || naLayer != null)
                {
                    mapControl.DeleteLayer(i);
                }
            }
            //清除网络数据集
            ILayer datalayer = LayerUtil.QueryLayerInMap(mapControl, "网络数据集");

            if (datalayer != null)
            {
                mapControl.Map.DeleteLayer(datalayer);
            }
            IActiveView pActiveView = mapControl.ActiveView;

            pActiveView.PartialRefresh(esriViewDrawPhase.esriViewGraphics, null, null);
            mapControl.Refresh();
        }
Beispiel #2
0
 public void UpdateSymbol(AxMapControl mapControl)
 {
     SymbolUtil.ClearElement(mapControl);
     this.barryElements.Clear();
     this.stopElements.Clear();
     this.stopPoints.ForEach(point => stopElements.Add(SymbolUtil.DrawSymbolWithPicture(point, mapControl, Common.StopImagePath)));
     this.barryPoints.ForEach(point => barryElements.Add(SymbolUtil.DrawSymbolWithPicture(point, mapControl, Common.RouteBeakImggePath)));
 }
Beispiel #3
0
 public void UndoBarryPointSymbols(AxMapControl mapControl)
 {
     if (this.barryPoints.Count > 0)
     {
         this.barryPoints.RemoveAt(this.barryPoints.Count - 1);
         SymbolUtil.ClearElement(mapControl, this.barryElements[this.barryElements.Count - 1]);
         this.barryElements.RemoveAt(this.barryElements.Count - 1);
     }
 }
Beispiel #4
0
        public void ResetStopPointSymbols(AxMapControl mapControl)
        {
            this.stopPoints.Clear();
            this.stopElements.ForEach(element => SymbolUtil.ClearElement(mapControl, element));
            this.stopElements.Clear();
            IActiveView pActiveView = mapControl.ActiveView;

            pActiveView.PartialRefresh(esriViewDrawPhase.esriViewGraphics, null, null);
            mapControl.Refresh();
        }
Beispiel #5
0
 public void RemoveBarryPoint(AxMapControl mapControl, IPoint point)
 {
     if (this.BarryPoints.Count > 0)
     {
         int index = JudgePointIsInCircle(this.barryPoints, point);
         if (index != -1)
         {
             this.barryPoints.RemoveAt(index);
             SymbolUtil.ClearElement(mapControl, this.barryElements[index]);
             this.barryElements.RemoveAt(index);
         }
     }
 }
Beispiel #6
0
 public void ResetBarryPointSymbols(AxMapControl mapControl)
 {
     this.barryPoints.Clear();
     this.barryElements.ForEach(element => SymbolUtil.ClearElement(mapControl, element));
     this.barryElements.Clear();
 }