symbols zoom match with map zoom in 4.X version

244
1
01-08-2021 11:48 PM
rayza
by
New Contributor

I'm a freshman to use ArcGIS API for js. I know it can do this by ScaleDependentRenderer in 3.X, it seems that the ScaleDependentRenderer function was not come out, according to this web page,  how to make it?

1 Reply
UndralBatsukh
Esri Regular Contributor

Hi there, 

At 4.x you can watch the View.stationary property to check when the view is done animating, being navigated or resizing. Once the view is stationary then check the view.scale and at the desired scale, change your layer's renderer. 

Check out this super simple test app for how it can be done. 

Since you mentioned you are new to 4.x, you may find the following guide docs useful. 

1. Visualization overview

2. Watching for property changes

3. Visualization samples

Hope this helps,

-Undral

0 Kudos