I am trying to zoom to the extent of a layer that has definitionExpression on it. I cannot get it to zoom to anything but the world view. I want to setViewpontGeometry(queryLayer.fullExtent), but this doesn't seem to work. Do I have to build a view point manually?
Connections <SPAN class="punctuation token">{</SPAN>
target<SPAN class="punctuation token">:</SPAN> map
onOperationalLayersChanged<SPAN class="punctuation token">:</SPAN> <SPAN class="punctuation token">{</SPAN>
<SPAN class="token function">identifyQueryLayer</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN>
queryLayer<SPAN class="punctuation token">.</SPAN>definitionExpression <SPAN class="operator token">=</SPAN> app<SPAN class="punctuation token">.</SPAN>definitionQuery
<SPAN class="comment token">//This doesn't work?</SPAN>
mapView<SPAN class="punctuation token">.</SPAN><SPAN class="token function">setViewpointGeometry</SPAN><SPAN class="punctuation token">(</SPAN>queryLayer<SPAN class="punctuation token">.</SPAN>fullExtent<SPAN class="punctuation token">)</SPAN>
<SPAN class="comment token">//Do I have to build a viewpoint?</SPAN>
<SPAN class="comment token">//mapView.setViewpoint(newViewPoint);</SPAN>
<SPAN class="punctuation token">}</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></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>