I am using view.zoom to get the current zoom level. while the map itself is zooming in and out correctly the value is incorrect. for example. The map starts at zoom level 9. I will scroll in and the value changes
10
11
12
13
14
15
16
17
then I scroll out and the zoom value increases instead of decreasing
18
Then after that initial zoom out, the value starts to decrease again.
17
16
This causes an issue because I am using that value to determine if I am going to display a parcel layer.
view<SPAN class="punctuation token">.</SPAN><SPAN class="token function">on</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">'mouse-wheel'</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="operator token">=</SPAN><SPAN class="operator token">></SPAN> <SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">const</SPAN> _coreLogicLayer <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">this</SPAN><SPAN class="punctuation token">.</SPAN>props<SPAN class="punctuation token">.</SPAN>coreLogicLayer
<SPAN class="keyword token">const</SPAN> _layer <SPAN class="operator token">=</SPAN> map<SPAN class="punctuation token">.</SPAN>layers<SPAN class="punctuation token">.</SPAN>items<SPAN class="punctuation token">.</SPAN><SPAN class="token function">find</SPAN><SPAN class="punctuation token">(</SPAN>x <SPAN class="operator token">=</SPAN><SPAN class="operator token">></SPAN> x<SPAN class="punctuation token">.</SPAN>title <SPAN class="operator token">===</SPAN> <SPAN class="string token">'Core Logic'</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="keyword token">if</SPAN> <SPAN class="punctuation token">(</SPAN>view<SPAN class="punctuation token">.</SPAN>zoom <SPAN class="operator token">>=</SPAN> <SPAN