SimpleRenderer着色法渲染地图

本文介绍了一种使用ArcGIS进行地图渲染的方法。通过C#代码实现了地图层的透明度渲染,包括设定填充符号的颜色及边框颜色,以及指定透明度字段。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

代码:

private void button2_Click(object sender, EventArgs e) { IActiveView pActiveView; IGeoFeatureLayer pGeoFeatureL; pActiveView = this.axMapControl1.ActiveView; IMap pMap = this.axMapControl1.Map; pMap.ReferenceScale = 0;//设定label是否随地图缩放而变化 pGeoFeatureL = pMap.get_Layer(4) as IGeoFeatureLayer; IFillSymbol pSimpleFillS; ILineSymbol pLineSymbol; pSimpleFillS = new SimpleFillSymbolClass(); pSimpleFillS.Color = getRGB(120, 110, 200); pLineSymbol = new SimpleLineSymbolClass(); pLineSymbol.Color = getRGB(255, 0, 0); pLineSymbol.Width = 1; pSimpleFillS.Outline = pLineSymbol; ISimpleRenderer pSimpleRenderer; pSimpleRenderer = new SimpleRendererClass(); pSimpleRenderer.Symbol = (ISymbol)pSimpleFillS; pSimpleRenderer.Description = "USA"; pSimpleRenderer.Label = "简单渲染"; ITransparencyRenderer pTransRenderer; pTransRenderer = pSimpleRenderer as ITransparencyRenderer; pTransRenderer.TransparencyField = "地区"; pGeoFeatureL.Renderer = pTransRenderer as IFeatureRenderer; pActiveView.PartialRefresh(esriViewDrawPhase.esriViewGeography, null, null); }

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值