Select to view content in your preferred language

ArcGISDynamicMapServiceLayer not using LayerDrawingOptions for rendering

2872
1
06-04-2014 12:23 PM
JosephMcCausland
Esri Contributor
Does anyone has any experience with using LayerDrawingOptions to change the renderer of a DynamicMapSerivce?  I followed all of the exmaples to do this but the layer is still rendered using the original renderer.


            var drawingOptions = new client.LayerDrawingOptions();

            // Set the ID of the map layer in the local map service
            drawingOptions.LayerID = 3;

            // Create a new simple renderer with a simple line symbol and set the renderer property on the layer drawing options object
            drawingOptions.Renderer = new ESRI.ArcGIS.Client.SimpleRenderer()
            {
                Symbol = new SimpleLineSymbol()
                {
                    Color = new SolidColorBrush(Colors.Blue),
                    Width = 2.5,
                    Style = SimpleLineSymbol.LineStyle.Solid
                },

                Description = "This is a blue line."
            };

            mapServiceLayer.LayerDrawingOptions = new ESRI.ArcGIS.Client.LayerDrawingOptionsCollection();
            mapServiceLayer.LayerDrawingOptions.Add(drawingOptions);
            mapServiceLayer.Refresh();
0 Kudos
1 Reply
JosephMcCausland
Esri Contributor
Problem solved.  Dynamic layer support wasn't enabled on the map service.
0 Kudos