<?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: set zoom level one more than a given extent in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-zoom-level-one-more-than-a-given-extent/m-p/156501#M14583</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;So the couple of lines of code look like this &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.setExtent(polygon.getExtent(), true).then(function(){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.setLevel(map.getLevel() - 1)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } );
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem that I have is that visually so see it zooming in and then zooming out one level.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What I need is to calculate what level the extent would be , and only then set the level on the map to level -1.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The question is if is there any way to know what level a polygon would be displayed, without setting anything on the map, and then just set the level - 1.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 08:18:16 GMT</pubDate>
    <dc:creator>JorgeFiallega</dc:creator>
    <dc:date>2021-12-11T08:18:16Z</dc:date>
    <item>
      <title>set zoom level one more than a given extent</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-zoom-level-one-more-than-a-given-extent/m-p/156500#M14582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Currently I have a handle on a polygon and I set the extent of the map by doing &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;map.setExtent(polygon.getExtent(), true);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would like to be able to move out one more level from the given extent. Meaning from the result of the setExtent operation above.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I guess I could pseudocode&amp;nbsp; so something like&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
1. map.setExtent(polygon.getExtent(), true);
2. extentDoneCallBack(map.setLevel(map.getLevel() + 1));
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;making use of the deferred call back of the setExtent action.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Would this be the correct approach. It does not look right to me.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Mar 2014 19:57:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-zoom-level-one-more-than-a-given-extent/m-p/156500#M14582</guid>
      <dc:creator>JorgeFiallega</dc:creator>
      <dc:date>2014-03-04T19:57:05Z</dc:date>
    </item>
    <item>
      <title>Re: set zoom level one more than a given extent</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-zoom-level-one-more-than-a-given-extent/m-p/156501#M14583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;So the couple of lines of code look like this &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.setExtent(polygon.getExtent(), true).then(function(){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.setLevel(map.getLevel() - 1)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } );
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem that I have is that visually so see it zooming in and then zooming out one level.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What I need is to calculate what level the extent would be , and only then set the level on the map to level -1.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The question is if is there any way to know what level a polygon would be displayed, without setting anything on the map, and then just set the level - 1.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 08:18:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-zoom-level-one-more-than-a-given-extent/m-p/156501#M14583</guid>
      <dc:creator>JorgeFiallega</dc:creator>
      <dc:date>2021-12-11T08:18:16Z</dc:date>
    </item>
  </channel>
</rss>

