ThinkGeo.com    |     Documentation    |     Premium Support

ClassBreak/UniqueValue and using the same column for a text label

I have an issue where I want to use ClassBreaks or UniqueValue styles, I define the style, create the value collection and set the the column to use, say “WidgetType”:

        ValueStyle style = new ValueStyle("WidgetType", widgetItemsCollection);

I want to also print a text label of the type next to the posting.

        TextStyle textStyle = new TextStyle("WidgetType", font, brush);

When this is run, I get a Pink Map with a red X and “An item with the same key has already been added” (or something like that).

If I set the valuestyle on it’s own, or just post the text, all is fine. Selecting a different column for each is fine, just when they are the same column.

Any initial thoughts, I suppose if I post them as two different layers it would work, but that seems like extra work.

Chris

Hi Chris,

It’s recreated and fixed in the latest beta112, pull and have another try.

Thanks,
Ben

Wow, that was fast. Let me give it a try and I’ll let you know.

Chris

That fixed it Ben, as always, thanks for the assist!

You are always welcome, Chris!