<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Zoom to selected II in Web AppBuilder Custom Widgets Questions</title>
    <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/zoom-to-selected-ii/m-p/838806#M9064</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can't zoom to a single point using "getExtent" since, unlike a group of points or a line or a feature, it doesn't have an extent. You would have to use &lt;A href="https://developers.arcgis.com/javascript/3/jsapi/map-amd.html#centerandzoom"&gt;centerAndZoom&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 21 Apr 2017 19:50:41 GMT</pubDate>
    <dc:creator>KenBuja</dc:creator>
    <dc:date>2017-04-21T19:50:41Z</dc:date>
    <item>
      <title>Zoom to selected II</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/zoom-to-selected-ii/m-p/838805#M9063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, I'm using WAB 2.2 and the Jewelry Box Theme.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to select a feature on the map and zoom to it. I would think there would be examples of this but they sure are hard to find.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;queryTask = new QueryTask(MyFeatureLayer);&lt;BR /&gt; query = new Query();&lt;BR /&gt; query.where = myWhereClause;&lt;BR /&gt; query.returnGeometry = true;&lt;BR /&gt; query.outSpatialReference = this.map.spatialReference;&lt;BR /&gt; queryTask.execute(query, function (results) {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;var geo = results.features[0].geometry;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;this.map.setExtent(geo.getExtent(),true);&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;I'm attempting to select a single point in a point feature layer and zoom to that feature.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TypeError: Cannot read property 'toJson' of null&lt;BR /&gt; at Object.setExtent (init.js:593)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Apr 2017 19:44:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/zoom-to-selected-ii/m-p/838805#M9063</guid>
      <dc:creator>GregRieck</dc:creator>
      <dc:date>2017-04-21T19:44:38Z</dc:date>
    </item>
    <item>
      <title>Re: Zoom to selected II</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/zoom-to-selected-ii/m-p/838806#M9064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can't zoom to a single point using "getExtent" since, unlike a group of points or a line or a feature, it doesn't have an extent. You would have to use &lt;A href="https://developers.arcgis.com/javascript/3/jsapi/map-amd.html#centerandzoom"&gt;centerAndZoom&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Apr 2017 19:50:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/zoom-to-selected-ii/m-p/838806#M9064</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2017-04-21T19:50:41Z</dc:date>
    </item>
    <item>
      <title>Re: Zoom to selected II</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/zoom-to-selected-ii/m-p/838807#M9065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ken,&lt;/P&gt;&lt;P&gt;Thank you for the response. Boy what a pain that option is. I'm having issues setting the&amp;nbsp;&lt;SPAN style="color: #4d4d4d; background-color: #fafafa;"&gt;levelOrFactor value. I tried 1 (one) and it zooms out to the entire background layer. I finally tried 20 (twenty) and it is at an acceptable level. Is there a "pan" option? Something that might keep the scale at the same scale the user is currently at and just move to the selected feature?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Apr 2017 22:55:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/zoom-to-selected-ii/m-p/838807#M9065</guid>
      <dc:creator>GregRieck</dc:creator>
      <dc:date>2017-04-21T22:55:17Z</dc:date>
    </item>
    <item>
      <title>Re: Zoom to selected II</title>
      <link>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/zoom-to-selected-ii/m-p/838808#M9066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use &lt;A href="https://developers.arcgis.com/javascript/3/jsapi/map-amd.html#centerat"&gt;centerAt &lt;/A&gt;if you want to keep the same zoom scale that is currently set.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 22 Apr 2017 22:28:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/web-appbuilder-custom-widgets-questions/zoom-to-selected-ii/m-p/838808#M9066</guid>
      <dc:creator>AaronBooterbaugh</dc:creator>
      <dc:date>2017-04-22T22:28:26Z</dc:date>
    </item>
  </channel>
</rss>

