<?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 Extent loads but levels out in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extent-loads-but-levels-out/m-p/497191#M46177</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have created a map which loads an initialization extent which will be updated by a custom extent via a javascript function, loadMapFromURL(). This function extracts the extent parameters from the URL and sets this extent(thus a user is able to link to a specific view on the map).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This all works just fine on the development environment but in the test environment the level of the map is set back 2 to 4 levels. But by zooming in, the custom extent will exactly show up...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Via the console I'm able to check that the initialization extent is loaded, loadMapURL() is called which does load the custom extent and thereafter a 'new' extent is loaded. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have been debugging and logging this issue for a while now but I can't figure out what triggers this extent change. Anyone seen this before or has a clue what's happening?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 May 2013 07:08:45 GMT</pubDate>
    <dc:creator>Jan-WillemBaart</dc:creator>
    <dc:date>2013-05-16T07:08:45Z</dc:date>
    <item>
      <title>Extent loads but levels out</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extent-loads-but-levels-out/m-p/497191#M46177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have created a map which loads an initialization extent which will be updated by a custom extent via a javascript function, loadMapFromURL(). This function extracts the extent parameters from the URL and sets this extent(thus a user is able to link to a specific view on the map).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This all works just fine on the development environment but in the test environment the level of the map is set back 2 to 4 levels. But by zooming in, the custom extent will exactly show up...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Via the console I'm able to check that the initialization extent is loaded, loadMapURL() is called which does load the custom extent and thereafter a 'new' extent is loaded. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have been debugging and logging this issue for a while now but I can't figure out what triggers this extent change. Anyone seen this before or has a clue what's happening?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 May 2013 07:08:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extent-loads-but-levels-out/m-p/497191#M46177</guid>
      <dc:creator>Jan-WillemBaart</dc:creator>
      <dc:date>2013-05-16T07:08:45Z</dc:date>
    </item>
    <item>
      <title>Re: Extent loads but levels out</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extent-loads-but-levels-out/m-p/497192#M46178</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Have you verified the test environment URL and development environment URL from same machine?.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Custom extent scale change if you are checking the extents in different machine with different screen resolutions. It may be setting the same extent in map, but depending upon the height and width of the map, scale changes.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 May 2013 07:34:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extent-loads-but-levels-out/m-p/497192#M46178</guid>
      <dc:creator>VinayBansal</dc:creator>
      <dc:date>2013-05-16T07:34:49Z</dc:date>
    </item>
    <item>
      <title>Re: Extent loads but levels out</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extent-loads-but-levels-out/m-p/497193#M46179</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;No, the behaviour is visible on two different machines. The map is loaded in a div with set width and height. So I suppose auto scale isn't the cause&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 May 2013 07:42:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extent-loads-but-levels-out/m-p/497193#M46179</guid>
      <dc:creator>Jan-WillemBaart</dc:creator>
      <dc:date>2013-05-16T07:42:12Z</dc:date>
    </item>
    <item>
      <title>Re: Extent loads but levels out</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extent-loads-but-levels-out/m-p/497194#M46180</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Can you post your code on how are you setting the extent?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 May 2013 08:40:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extent-loads-but-levels-out/m-p/497194#M46180</guid>
      <dc:creator>VinayBansal</dc:creator>
      <dc:date>2013-05-16T08:40:13Z</dc:date>
    </item>
    <item>
      <title>Re: Extent loads but levels out</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extent-loads-but-levels-out/m-p/497195#M46181</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sure!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Initialization of the map&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt; 
if (WEBGIS_INIT_EXTENT) {
 map = new esri.Map(WEBGIS_KAART_DIV, {extent: WEBGIS_INIT_EXTENT, logo: false, fitExtent: true, slider: true});
 } else {
 map = new esri.Map(WEBGIS_KAART_DIV, { logo: true, nav:true });
 }&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Setting a new extent with parameters in the URL(?xmin=32423.233 etc)&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
function loadMapfromURL() {
 var paramxmin = getURLParam('xmin');
 var paramymin = getURLParam('ymin');
 var paramxmax = getURLParam('xmax');
 var paramymax = getURLParam('ymax');
 var paramwkid = getURLParam('wkid');

 // check if param available
 if (paramxmin != '' &amp;amp;&amp;amp; paramymin != '' &amp;amp;&amp;amp; paramxmax != '' &amp;amp;&amp;amp; paramymax != '' &amp;amp;&amp;amp; paramwkid != '') {
&amp;nbsp; var xmin = Number(paramxmin);
&amp;nbsp; var ymin = Number(paramymin);
&amp;nbsp; var xmax = Number(paramxmax);
&amp;nbsp; var ymax = Number(paramymax);
&amp;nbsp; var wkid = Number(paramwkid);

&amp;nbsp; // Set view
&amp;nbsp; var newExtent = new esri.geometry.Extent(xmin, ymin, xmax, ymax, new esri.SpatialReference({'wkid': wkid}));
&amp;nbsp; map.setExtent(newExtent, false);
 }
}
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And the call to the above functions. &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
dojo.ready(function() {
 webgisInitViewer();
 loadMapfromURL();
}
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is a stripped version of the code with just the setting of extents. More detail or context is possible! Hope it helps&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 21:51:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extent-loads-but-levels-out/m-p/497195#M46181</guid>
      <dc:creator>Jan-WillemBaart</dc:creator>
      <dc:date>2021-12-11T21:51:06Z</dc:date>
    </item>
    <item>
      <title>Re: Extent loads but levels out</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extent-loads-but-levels-out/m-p/497196#M46182</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Try by calling the loadMapFromURL function after your map loads. So that the extents get set after the map loads&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;dojo.connect(map, "onLoad", function () {&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; loadMapFromURL(); &amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 May 2013 10:28:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extent-loads-but-levels-out/m-p/497196#M46182</guid>
      <dc:creator>VinayBansal</dc:creator>
      <dc:date>2013-05-16T10:28:10Z</dc:date>
    </item>
    <item>
      <title>Re: Extent loads but levels out</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extent-loads-but-levels-out/m-p/497197#M46183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Cool, that did it! Thanks for the tip! Simple but effective &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 May 2013 12:42:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/extent-loads-but-levels-out/m-p/497197#M46183</guid>
      <dc:creator>Jan-WillemBaart</dc:creator>
      <dc:date>2013-05-16T12:42:41Z</dc:date>
    </item>
  </channel>
</rss>

