ICommand pCommand = new ControlsNewFreeHandToolClass(); pCommand.OnCreate(map.Object); map.CurrentTool = pCommand as ITool;
List<IGraphicsContainer> graphicsContainers = GISUtil.layers.get_LayerSymbols_graphicContainerAll(ref map); graphicsContainers.Add(((IGraphicsContainer)(IActiveView)map.Map)); for (int i = 0; i < graphicsContainers.Count; i++) { graphicsContainers.Reset(); IElement element = graphicsContainers.Next(); while (element != null) { element = graphicsContainers.Next(); } } public List<IGraphicsContainer> get_LayerSymbols_graphicContainerAll(ref AxMapControl map) { List<IGraphicsContainer> result = new List<IGraphicsContainer>(); //Try to get the requested symbols layer as a graphics layer. If none was found, return the map's main one. try { ICompositeLayer mainGraphicsLayer = (ICompositeLayer)map.get_Layer(0); for (int i = 0; i < mainGraphicsLayer.Count; i++) { result.Add((IGraphicsContainer)mainGraphicsLayer.get_Layer(i)); } } catch (Exception e) { LogFile.appendLine_error(e); } return result; }
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.