Select to view content in your preferred language

Anybody successfully used InfoSymbolContainer?

1342
3
02-02-2011 05:41 AM
TyroneLigon
Deactivated User
Apologizing in advance because I can't conveniently post the code...our app allows the user to put annotation(s) on the map using a graphic with an info symbol. I'm having difficulty with the styling. Currently, I create a style using a CSSStyleDeclaration object, then I set the style declaration using the StyleManager, then I set the info symbol's containerStyleName property to that of the style name. The user is allowed to change the info symbol's border color through an annotation form.

This implementation works just fine - the issue is if the user adds another annotation and changes the border color. The border color ends up being changed for every info symbol, probably because I'm editing the style.

I wanted to experiment with the InfoSymbolContainer in the hopes that I can overcome this issue, but I can't seem to get it to work at all, and I can't find any examples. The alternative would be to generate a unique name for each style, which seems like overkill and cluttering of the style manager.
Tags (2)
0 Kudos
3 Replies
DasaPaddock
Esri Regular Contributor
You will need to create separate style declarations for each InfoSymbol if you want them to have different values.
0 Kudos
TyroneLigon
Deactivated User
That's what I ended up doing - I dynamically generate a CSSStyleDeclaration, set my styles (border color, background color, etc.), generate a unique name for the style, add it to the StyleManager, and then finally give the infoSymbol the style's unique name. I guess I don't understand the purpose and/or implementation of the InfoSymbolContainer.
0 Kudos
DasaPaddock
Esri Regular Contributor
An instance of a InfoSymbolContainer is the parent to the class created by the InfoSymbol's infoRenderer factory.
0 Kudos