Feature Visible at given scale with definitionExpression

351
0
09-30-2020 06:02 AM
kawishabbas
Occasional Contributor

Hello,

I am working on react and I want to show the Line feature at a given scale with definitionExpression. For example, if the scale is less than 20000 then show only network 1 while scale is greater than 20000 then show all records on map.

The following statement is not working well. Is anyone can help me?

if (_this.state.scale < 20000){
                    
      geojsonServiceFiber.definitionExpression = "network = 1"
                    
}
if (_this.state.scale > 20000){
                    
      geojsonServiceFiber.definitionExpression = "1=1"
} ‍‍‍‍‍‍‍‍
0 Kudos
0 Replies