Scale Graphics Layer

3448
1
07-31-2014 02:31 PM
JerrySchultz
New Contributor III

I would like to Scale an entire graphics layer.


I have created a Graphics Layer that is a bubble map. As the user zooms in the bubbles remain the same number of pixels. Many users want to change the Bubble sizes. Is there a way to SCALE the entire graphics layer so that this could be attached to a slider bar and thus allow interactive changes to bubble size instead of manually removing and rebuilding the entire graphics layer.

0 Kudos
1 Reply
EliseAcheson1
Occasional Contributor

Hi,

One thing you could try would be to use a renderer on your graphics layer, and changing the renderer (via setRenderer) as a way to scale symbols (really just changing the symbols sizes, but in one go via a renderer). For example you could create a UniqueValueRenderer that sets a symbol of a certain size for a graphic depending on the value of some attribute or the graphic representing the desired size. When you want to change the size of your graphics in one go, you could call setRenderer with a new renderer that has the desired set of sizes. AIf you are using PictureMarkerSymbols, you can call setSize on it so you could use some logic there to tie a unique value to a certain symbol sizing (again via creating a renderer from the set of sized symbols).

Let me know if this makes sense,

~elise

0 Kudos