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?
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
Undral, your code example link is broken. Any chance you could republish please? I'm trying to swap between an icon at the centre of a feaure when zoomed out to the feature bounbary when zoomed in (I have one json layer with multi-polygons).
Thanks, Matthew
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.