特定图层的渲染

ESRI.ArcGIS.ADF.Web.UI.WebControls.LayerFormat layerFormat =
ESRI.ArcGIS.ADF.Web.UI.WebControls.LayerFormat.FromMapResourceManager(
MapResourceManager1, resourceName, layerID);
ESRI.ArcGIS.ADF.Web.Display.Symbol.SimpleMarkerSymbol adfSimpleMarkerSymbol =
  new ESRI.ArcGIS.ADF.Web.Display.Symbol.SimpleMarkerSymbol();
adfSimpleMarkerSymbol.Color = System.Drawing.Color.Purple;
adfSimpleMarkerSymbol.Type = ESRI.ArcGIS.ADF.Web.Display.Symbol.MarkerSymbolType.Triangle;
adfSimpleMarkerSymbol.Width = 20;

// Initialize a Web ADF Renderer with the symbol
ESRI.ArcGIS.ADF.Web.Display.Renderer.SimpleRenderer adfSimpleRenderer =
  new ESRI.ArcGIS.ADF.Web.Display.Renderer.SimpleRenderer(adfSimpleMarkerSymbol);

// Use the renderer to specify the LayerFormat's default symbology
layerFormat.Renderer = adfSimpleRenderer;
posted @ 2009-01-05 17:17  周文  阅读(361)  评论(0编辑  收藏  举报