m.rieke

GenerateRendererTask creating always symbols with outline

Discussion created by m.rieke on Jul 10, 2013
Latest reply on Jul 11, 2013 by m.rieke
Hi all,

I am desperately trying to create a Renderer on my dynamic MapServer without any sort of outline for my symbols. Here is the code I am using for the request (in analogy to this sample):

function createRenderer(c1, c2) {
        var classDef = new esri.tasks.ClassBreaksDefinition();
        classDef.classificationField = dijit.byId("fieldNames").get("value") || "speed";
        classDef.classificationMethod = "natural-breaks";
        classDef.breakCount = 7;

        var colorRamp = new esri.tasks.AlgorithmicColorRamp();
        colorRamp.fromColor = new dojo.colorFromHex(c1);
        colorRamp.toColor = new dojo.colorFromHex(c2);
        colorRamp.algorithm = "hsv";
        
        classDef.baseSymbol = new esri.symbol.SimpleMarkerSymbol(esri.symbol.SimpleMarkerSymbol.STYLE_SOLID, 4,
   null,
   new dojo.Color([0,255,0,0.25]));
        classDef.colorRamp = colorRamp;

        var params = new esri.tasks.GenerateRendererParameters();
        params.classificationDefinition = classDef;
        var generateRenderer = new esri.tasks.GenerateRendererTask(app.dataUrl);
        generateRenderer.execute(params, applyRenderer, errorHandler);
      }


the outgoing generateRenderer REST request is not reflecting my symbol style. In fact it defines an outline and a size of 12 (?!) for my symbols in every case. Am I missing something? I have followed the SimpleMarkerSymbol API.

The classDefinition parameter transports this JSON:
{
   "baseSymbol":{
      "color":[
         255,
         255,
         255,
         64
      ],
      "size":12,
      "angle":0,
      "xoffset":0,
      "yoffset":0,
      "type":"esriSMS",
      "style":"esriSMSCircle",
      "outline":{
         "color":[
            0,
            0,
            0,
            255
         ],
         "width":1,
         "type":"esriSLS",
         "style":"esriSLSSolid"
      }
   },
   "colorRamp":{
      "type":"algorithmic",
      "algorithm":"esriHSVAlgorithm",
      "fromColor":[
         255,
         255,
         204,
         255
      ],
      "toColor":[
         0,
         104,
         55,
         255
      ]
   },
   "type":"classBreaksDef",
   "classificationField":"speed",
   "classificationMethod":"esriClassifyNaturalBreaks",
   "breakCount":7
}


Thanks for any help!
Matthes

Outcomes