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?
<SPAN class="keyword token">if</SPAN> <SPAN class="punctuation token">(</SPAN>_this<SPAN class="punctuation token">.</SPAN>state<SPAN class="punctuation token">.</SPAN>scale <SPAN class="operator token"><</SPAN> <SPAN class="number token">20000</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">{</SPAN>
geojsonServiceFiber<SPAN class="punctuation token">.</SPAN>definitionExpression <SPAN class="operator token">=</SPAN> <SPAN class="string token">"network = 1"</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="keyword token">if</SPAN> <SPAN class="punctuation token">(</SPAN>_this<SPAN class="punctuation token">.</SPAN>state<SPAN class="punctuation token">.</SPAN>scale <SPAN class="operator token">></SPAN> <SPAN class="number token">20000</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">{</SPAN>
geojsonServiceFiber<SPAN class="punctuation token">.</SPAN>definitionExpression <SPAN class="operator token">=</SPAN> <SPAN class="string token">"1=1"</SPAN>
<SPAN class="punctuation token">}</SPAN> <SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>