Joined Field in ClassBreaksRenderer

2199
7
03-14-2016 04:20 PM
by Anonymous User
Not applicable

Hello - I have a ClassBreaksRenderer that's failing when I use a joined field for the attributes. The joined field name has periods in it, e.g.  'database.dbo.testField'. I don't see anything about this renderer not working on joined data -- can it not handle the field name?

Thanks!

var testCBR = new ClassBreaksRenderer(lmpPoint0, "database.dbo.testField");
        testCBR.addBreak({
            maxValue : 10,
            minValue : -50,
            symbol : lmpPoint1
        });
        testCBR.addBreak({
            maxValue : 20,
            minValue : 10.01,
            symbol : lmpPoint2
        });
        testCBR.addBreak({
            maxValue : 21,
            minValue : 20.01,
            symbol : lmpPoint3
        });
        testCBR.addBreak({
            maxValue : 22,
            minValue : 21.01,
            symbol : lmpPoint4
        });
        testCBR.addBreak({
            maxValue : 23,
            minValue : 22.01,
            symbol : lmpPoint5
        });
        testCBR.addBreak({
            maxValue : 30,
            minValue : 23.01,
            symbol : lmpPoint6
        });
var testCBROption= new LayerDrawingOptions(;
testCBROption.renderer = testCBR;

var lmpOptions = [];
lmpOptions[2] = testCBROption;


var test = new ArcGISDynamicMapServiceLayer("https://etc.etc.etc", {
  showAttribution : false,
  id : "testid",
  visible : true
})
test.on('load', function() {
  test.setLayerDrawingOptions(lmpOptions);
}
0 Kudos
7 Replies
RobertScheitlin__GISP
MVP Emeritus

Sarah,

  Can I see the code you are using to add that field to the ClassBreaksRenderer?

0 Kudos
by Anonymous User
Not applicable

Hi Robert - I updated my question with code. I cannot post the whole application but that's the gist of it

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Sarah,

  This is what I used on a joined field and it worked fine:

var renderer = new ClassBreaksRenderer(symbol, "Parcels3.PRICE_SOURCE");
        renderer.defaultSymbol = new SimpleFillSymbol().setColor(new Color([255, 255, 255, 0.5]));
        renderer.addBreak(0, 1, new SimpleFillSymbol().setColor(new Color([56, 168, 0, 0.5])));
        renderer.addBreak(2, 2.99, new SimpleFillSymbol().setColor(new Color([139, 209, 0, 0.5])));
        renderer.addBreak(3, 3.99, new SimpleFillSymbol().setColor(new Color([255, 255, 0, 0.5])));
        renderer.addBreak(4, 4.99, new SimpleFillSymbol().setColor(new Color([255, 128, 0, 0.5])));
        renderer.addBreak(5, Infinity, new SimpleFillSymbol().setColor(new Color([255, 0, 0, 0.5])));

        var infoTemplate = new InfoTemplate("${Parcels3.NAME}", "${*}");
by Anonymous User
Not applicable

I tried changing the format to match what you used, no go. The field works fine for definition expressions and info templates. In fact, although the data doesn't display if I click randomly I eventually hit something and get a pop-up with the feature's data. It's there, just not drawing.

The issue isn't the symbols because they work fine on other layers, and the renderer works on other layers as well.

The only difference I see with your example is that my layer is from an SDE and there are two periods...

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Sarah,

  Is this a join or a view in the SDE?

0 Kudos
by Anonymous User
Not applicable

Join in the ArcMap document that is published as a service

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Sorry to say it sounds like a tech support call then.

0 Kudos