<?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: setExtent: need to execute twice in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/setextent-need-to-execute-twice/m-p/431856#M39767</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Don, can you post more of your code?&amp;nbsp; I tested your method with 2.7 and it seems to be working fine.&amp;nbsp; Or could you provide more information about the map services you are using?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 16 Jun 2012 16:25:53 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2012-06-16T16:25:53Z</dc:date>
    <item>
      <title>setExtent: need to execute twice</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/setextent-need-to-execute-twice/m-p/431855#M39766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;We have a function for zooming to a saved extent that only works when executed a second time:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;function setMapExtentESRI(xMin, yMin, xMax, yMax) {
var sr = new esri.SpatialReference({wkid: 1337}); /* where 1337 is a well-known ID */
var extent = new esri.geometry.Extent(xMin, yMin, xMax, yMax, sr); /*
esrimap.setExtent(extent);
}&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The first time this exact code is executed, the map moves to the correct extent but disappears. The second time this code is executed with the same parameters, with no other code executing in the meantime, the map appears at that extent.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Running API version 2.5.&amp;nbsp; Tried 2.7 with the same results.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jun 2012 22:17:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/setextent-need-to-execute-twice/m-p/431855#M39766</guid>
      <dc:creator>AndyStewart1</dc:creator>
      <dc:date>2012-06-11T22:17:14Z</dc:date>
    </item>
    <item>
      <title>Re: setExtent: need to execute twice</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/setextent-need-to-execute-twice/m-p/431856#M39767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Don, can you post more of your code?&amp;nbsp; I tested your method with 2.7 and it seems to be working fine.&amp;nbsp; Or could you provide more information about the map services you are using?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Jun 2012 16:25:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/setextent-need-to-execute-twice/m-p/431856#M39767</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2012-06-16T16:25:53Z</dc:date>
    </item>
  </channel>
</rss>

