I'm trying to set the zoom level for the 'Zoom to' feature from the attribute table using WAB 2.12. I believe the same method is shared when using the enable pop-up feature from the attribute table, or at least I hope it is shared. The default setting zooms in too close and I would like to set the zoom level so that it is farther out. I have tried modifying /jimu.js/zoomToUtils.js to set the extentFactor in the zoomToFeatureSet method:
mo<SPAN class="punctuation token">.</SPAN>zoomToFeatureSet <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">function</SPAN><SPAN class="punctuation token">(</SPAN>map<SPAN class="punctuation token">,</SPAN> featureSet<SPAN class="punctuation token">,</SPAN> <SPAN class="comment token">/*optional*/</SPAN>extentFactor<SPAN class="punctuation token">)</SPAN> <SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">var</SPAN> layer <SPAN class="operator token">=</SPAN> featureSet<SPAN class="punctuation token">.</SPAN>features <SPAN class="operator token">&&</SPAN>
featureSet<SPAN class="punctuation token">.</SPAN>features<SPAN class="punctuation token">.</SPAN>length <SPAN class="operator token">></SPAN> <SPAN class="number token">0</SPAN> <SPAN class="operator token">&&</SPAN>
featureSet<SPAN class="punctuation token">.</SPAN>features<SPAN class="punctuation token">[</SPAN><SPAN class="number token">0</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">.</SPAN>getLayer <SPAN class="operator token">&&</SPAN>
featureSet<SPAN class="punctuation token">.</SPAN>features<SPAN class="punctuation token">[</SPAN><SPAN class="number token">0</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">.</SPAN><SPAN class="token function">getLayer</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">var</SPAN> layerId <SPAN class="operator token">=</SPAN> layer <SPAN class="operator token">?</SPAN> layer<SPAN class="punctuation token">.</SPAN>id <SPAN class="punctuation token">:</SPAN> <SPAN class="keyword token">null</SPAN><SPAN class="punctuation