<?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: Zooming to a extent. in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zooming-to-a-extent/m-p/283366#M26174</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey if the spatialReference&amp;nbsp; of your map is the same as of the extent&amp;nbsp; you can try this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var mercExtent =new esri.geometry.Extent({"xmin":xmin,"ymin":ymin,"xmax":xmax,"ymax":ymax,"spatialReference":{"wkid":4326}});
map.setExtent(mercExtent );&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope it helps you :).....&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is a link to the API Reference&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi_start.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi_start.htm&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 13:43:10 GMT</pubDate>
    <dc:creator>JanJeske</dc:creator>
    <dc:date>2021-12-11T13:43:10Z</dc:date>
    <item>
      <title>Zooming to a extent.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zooming-to-a-extent/m-p/283364#M26172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a map and the min longitude, min latitude, max longitude and max latitude values of a country.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Say the values are, -1.41382, 42.42873, 1.78659, 42.65601.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;How should I zoom the map to this extent?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Prasanna&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Nov 2012 07:34:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zooming-to-a-extent/m-p/283364#M26172</guid>
      <dc:creator>PrasannaRaghavendar</dc:creator>
      <dc:date>2012-11-17T07:34:47Z</dc:date>
    </item>
    <item>
      <title>Re: Zooming to a extent.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zooming-to-a-extent/m-p/283365#M26173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I found out that doing this would zoom &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;var mercExtent =new esri.geometry.Extent({"xmin":xmin,"ymin":ymin,"xmax":xmax,"ymax":ymax,"spatialReference":{"wkid":4326}});// esri.geometry.geographicToWebMercator(geoCountryExtent) as esri.geometry.Extent; &amp;nbsp;&amp;nbsp;&amp;nbsp; var startExtent= esri.geometry.geographicToWebMercator(mercExtent);&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, the latitude and longitude values are the Geographic coordinates while the x, y coordinates are the WebMercator coordinates?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Prasanna&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Nov 2012 09:27:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zooming-to-a-extent/m-p/283365#M26173</guid>
      <dc:creator>PrasannaRaghavendar</dc:creator>
      <dc:date>2012-11-17T09:27:32Z</dc:date>
    </item>
    <item>
      <title>Re: Zooming to a extent.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zooming-to-a-extent/m-p/283366#M26174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey if the spatialReference&amp;nbsp; of your map is the same as of the extent&amp;nbsp; you can try this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;var mercExtent =new esri.geometry.Extent({"xmin":xmin,"ymin":ymin,"xmax":xmax,"ymax":ymax,"spatialReference":{"wkid":4326}});
map.setExtent(mercExtent );&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope it helps you :).....&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is a link to the API Reference&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi_start.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi_start.htm&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:43:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/zooming-to-a-extent/m-p/283366#M26174</guid>
      <dc:creator>JanJeske</dc:creator>
      <dc:date>2021-12-11T13:43:10Z</dc:date>
    </item>
  </channel>
</rss>

