示例#1
0
        private void SetPolylineMarkerSymbol(ISymbol symbol)
        {
            SimpleLineSymbolClass simpleLineSymbol = symbol as SimpleLineSymbolClass;

            simpleLineSymbol.Width = 2;
            simpleLineSymbol.Color = SymbolUtil.GetColor(255, 0, 99);
        }
示例#2
0
        private void SetPointMarkerSymbol(ISymbol symbol)
        {
            SimpleMarkerSymbolClass simplePointSymbol = symbol as SimpleMarkerSymbolClass;

            simplePointSymbol.Style = esriSimpleMarkerStyle.esriSMSCircle;
            simplePointSymbol.Size  = 5;
            simplePointSymbol.Color = SymbolUtil.GetColor(255, 0, 0);
        }
示例#3
0
        private void SetPolygonMarkerSymbol(ISymbol symbol)
        {
            SimpleFillSymbolClass simpleFillSymbol = symbol as SimpleFillSymbolClass;
            SimpleLineSymbolClass simpleLineSymbol = new SimpleLineSymbolClass();

            SetPolylineMarkerSymbol(simpleLineSymbol as ISymbol);
            simpleFillSymbol.Outline = simpleLineSymbol;
            simpleFillSymbol.Color   = SymbolUtil.GetColor(222, 222, 222);
        }
        /// <summary>
        /// 设置图层颜色
        /// </summary>
        /// <param name="layer"></param>
        /// <param name="red"></param>
        /// <param name="blue"></param>
        /// <param name="green"></param>
        public static void SetLayerColor(ILayer layer, int red, int blue, int green)
        {
            IGeoFeatureLayer geoLayer      = layer as IGeoFeatureLayer;
            IFeatureRenderer featureRender = geoLayer.Renderer;
            ILineSymbol      pOutline      = new SimpleLineSymbolClass();

            pOutline.Color = SymbolUtil.GetColor(red, green, blue);
            // ISimpleRenderer pSimpleRenderer = new SimpleRendererClass()
            ISimpleRenderer pSimpleRenderer = featureRender as ISimpleRenderer;

            pSimpleRenderer.Label       = "NAME";
            pSimpleRenderer.Description = "ss";
            pSimpleRenderer.Symbol      = (ISymbol)pOutline;
            // pSimpleRenderer.a
            geoLayer.Renderer = pSimpleRenderer as IFeatureRenderer;
        }