Determining symbol size for Symbol.CreateSwatchAsync

05-11-2016 03:12 AM
New Contributor

I need to render a Symbol to an Image(Source). For that I can use Symbol.CreateSwatchAsync​. There is no overload that would determine the size of the rendered image automatically (Symbol.CreateSwatchAsync Method without any parameters defaults to 32x32 pixels with 96 dpi, which also throws an NotImplementedException when used?).

Some symbols need to be rendered at a larger size than others (for instance symbols that depend their size on an attribute value). I do not know up front what type of symbol I need to generate the image for (could be a simple one, or a size dependant one).


- Is there a way to determine the actual rendered size for a symbol upfront so it can be passed into Symbol.CreateSwatchAsync?

- Is there some other smart way to render symbols, independent of size?


Tags (3)
0 Kudos
1 Reply
Regular Contributor II

Would using UniqueValueRenderer work with symbols that have the different sizes in the symbol definitions through PictureMarkerSymbol height and width?

0 Kudos