Select to view content in your preferred language

esriSFSSolid red in templates not coming through.

2989
4
02-15-2011 08:58 AM
AndrewMalander
Emerging Contributor
Hello,

I have another Esri editor issue to ask about.  When we have a solid red simple fill symbol on a feature service, the editor template symbol is blank.  It doesn't happen with any of the other colors I have tested, only red.  When I look at the FeatureSymbol here is what I see.

((SolidColorBrush)((ESRI.ArcGIS.Client.FeatureService.Symbols.SimpleFillSymbol)template.GetSymbol(layer.Renderer)).Fill).Color
{#00000000}
    A: 0
    B: 0
    G: 0
    R: 0


Here is the JSON.

{
          "value" : "4",
          "label" : "Solid Red",
          "description" : "",
          "symbol" :
          {
            "type" : "esriSFS",
            "style" : "esriSFSSolid",
           
            "color" : [
              255,
              0,
              0,
              255
            ],
            "outline" :
            {
              "type" : "esriSLS",
              "style" : "esriSLSSolid",
             
              "color" : [
                110,
                110,
                110,
                255
              ],
              "width" : 0
            }
          }
        }

Any help would be appreciated!
0 Kudos
4 Replies
JenniferNery
Esri Regular Contributor
Are you able to see the symbol when you view in ArcGIS.com Map?

Similar to this: http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/HomelandSecurity/operations/MapServer (click View in ArcGIS.com Map).

When you query the layer where renderer field = 4 with return geometry set to true,

similar to this query: http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/HomelandSecurity/operations/MapServer/2/q...

do you get valid geometry (not empty)?

We tried to replicate this by using the same symbol on the feature service and we could not reproduce it.

Do other features show in your map? If not, maybe the map's SpatialReference does not match the layer's SpatialReference? Does your renderer have a default symbol? Maybe value="4" is not matched, it should use the default symbol if there's any.
0 Kudos
AndrewMalander
Emerging Contributor
When I look at it with data through the 'View in ArcGIS.com Map' I see the features on the map and I see the symbol in the edit legend.  I can't actually add/draw from there, but I do see them in beautiful red. Hmmmmmmm......
0 Kudos
AndrewMalander
Emerging Contributor
Here it is in the EditorWidget with no styles or anything.  The blank one is supposed to be solid red.

0 Kudos
JenniferNery
Esri Regular Contributor
I'm sorry about that. I was testing against the latest source code. I did not know we had a bug fix for this.

Unfortunately, it still exists in v2.1 but is fixed for future version of the API. What you can do for now is use a client-side renderer to override the renderer defined by your service.
0 Kudos