ArcGis实现添加MultiLayerMarkerSymbol(多个符号叠加生成新的符号)

private void axMapControl1_OnMouseDown(object sender, ESRI.ArcGIS.Controls.IMapControlEvents2_OnMouseDownEvent e)
        {
            //产生一个简单符号
            ISimpleMarkerSymbol pMarkerSymbol = new SimpleMarkerSymbolClass();
            pMarkerSymbol.Style = esriSimpleMarkerStyle.esriSMSCross;
            pMarkerSymbol.Color = GetRGBColor(, , );
            pMarkerSymbol.Angle = ;
            pMarkerSymbol.XOffset = ;//符号偏移鼠标点击点横坐标的距离
            pMarkerSymbol.YOffset = ;//符号偏移鼠标点击点纵坐标的距离
            //产生一个箭头符号
            IArrowMarkerSymbol pArrowMarker = new ArrowMarkerSymbolClass();
            pArrowMarker.Length = ;//箭头的顶点到底边的距离
            pArrowMarker.Width = ;//箭头的底边的宽度
            pArrowMarker.Color = GetRGBColor(, , );
            pArrowMarker.XOffset = -;
            pArrowMarker.YOffset = -;
            //产生一个叠加符号并把前面的符号加入
            IMultiLayerMarkerSymbol pMulMarker = new MultiLayerMarkerSymbolClass();
            pMulMarker.AddLayer(pArrowMarker);
            pMulMarker.AddLayer(pMarkerSymbol);
            IPoint pPoint = new PointClass();
            pPoint.PutCoords(e.mapX, e.mapY);
            object o = (object)pMulMarker;
            axMapControl1.DrawShape(pPoint, ref o);
        }
        private IRgbColor GetRGBColor(int red, int green, int blue)
        {
            IRgbColor pRgbColor = new RgbColorClass();
            pRgbColor.Red = red;
            pRgbColor.Green = green;
            pRgbColor.Blue = blue;
            return pRgbColor;
        }from:http://blog.sina.com.cn/s/blog_71d88f280100mj5z.html 
上一篇:关于C++与Java中虚函数问题的读书笔记


下一篇:thinkpad 睡眠唤醒后热键功能正常,但屏幕无法显示状态/进度条/图标