AnsweredAssumed Answered

Feature Visible at given scale with definitionExpression

Question asked by kawish on Sep 30, 2020

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"
}

Outcomes