I try to create a new renderer for a geo feature layer in ArcGIS 10. (My project is an asp.net based webservice) There is one solution I got from a tutorial that works, but only for a ISimpleRenderer
// Create an ArcObjects color object with the color set to blue for use by the layer's renderer
IRgbColor rgbColor = (IRgbColor)serverContext.CreateObject("esriDisplay.RgbColor");
rgbColor.Red = 0;
rgbColor.Green = 0;
rgbColor.Blue = 210;
// Set the symbol of the GeoFeatureLayer's renderer to use the color initialized above
ISimpleRenderer aoSimpleRenderer = (ISimpleRenderer)geoFeatureLayer.Renderer;
ISimpleLineSymbol simpleLineSymbol = (ISimpleLineSymbol)aoSimpleRenderer.Symbol;
simpleLineSymbol.Color = (IColor)rgbColor;
that works fine, but only for the SimpleRenderer. What I need is the ClassBreaksRenderer. Now the problem is, that if I create a new Renderer (SimpleRenderer or ClassBreaksRenderer), set the properties and apply it to the geo feature class (geoFeatureLayer.Renderer = cRenderer as IFeatureRenderer) the map is empty and no features are rendered.
Someone has an idea?
Regards