Select to view content in your preferred language

UniqueValueRenderer SimpleMakerSymbol not working anymore

2897
10
12-01-2016 08:34 AM
LouisDeSantis
Emerging Contributor

UniqueValueRenderer and ArcGISDynamicMapServiceLayer and SimpleMarkerSymbol

no longer seem to work properly together.

I'm using ARCGIS Server 10.2 and ARCGIS Javasript API 3.18.


I use the unique value render with SImpleFillSymbols and it works perfectly and at one point our application did have UniqueRendering working with Symbols.

Not sure if this was broken at some point within 3.1x or if its simply not possibly any more.

When I DO choose to use UniqueValueRender with SimpleMarkerSymbol the features render as gray filled symbols.
Picture attached.


Any insights would be enormously helpful.

**I know that the general code I have developed does in fact work and render using SimpleFillSymbols on the same field that won't generate a render with SimpleMarkerSymbols**


Thanks.


0 Kudos
10 Replies
LouisDeSantis
Emerging Contributor

I did notice that in the JSON as I was formatting and preparing it, it seemed to be missing but I am creating the symbol using this code.

return new SimpleMarkerSymbol({
"color": new Color(fillColor),
"size": symbolSize,
"angle": angle,
"xoffset": 0,
"yoffset": 0,
"type": "esriSMS",
"style": translatedStyle,
"originalSize": 10,
"outline": {
"color": new Color(borderColor),
"width": 3,
"type": "esriSLS",
"style": "esriSLSSolid"
}

});

Which turns into this JSON

{
   "color":{
      "r":21,
      "g":239,
      "b":104,
      "a":1
   },
   "size":13.333333333333332,
   "type":"simplemarkersymbol",
   "style":"square",
   "originalSize":10,
   "outline":{
      "color":{
         "r":0,
         "g":0,
         "b":0,
         "a":1
      },
      "width":4,
      "type":"simplelinesymbol",
      "style":"solid"
   },
   "xoffset":0,
   "yoffset":0
}

Which then gets added  to the renderer like this

renderer.addValue({
value: v,
symbol: _symbol,
label: label,
});

0 Kudos