<?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 How to obtain the extent of a layer programatically in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-obtain-the-extent-of-a-layer/m-p/572662#M53492</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Take an example of a &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer" rel="nofollow" target="_blank"&gt;Map Service&lt;/A&gt;&lt;SPAN&gt; in the REST API. This contains an Initial Extent and Full Extent:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;STRONG&gt;Intial Extent: &lt;/STRONG&gt;&lt;BR /&gt;XMin: -207.682974279982&lt;BR /&gt;YMin: -40.6075371681153&lt;BR /&gt;XMax: -37.1804225764967&lt;BR /&gt;YMax: 129.89501453537&lt;BR /&gt;Spatial Reference: 4269&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When creating a new Tiled or Dynamic layer from this service, the Initial Extent and Full Extent are listed as null in FireBug. How can these values be obtained programmatically? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Feature Layer contains a &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/featurelayer.htm#fullExtent" rel="nofollow" target="_blank"&gt;fullExtent&lt;/A&gt;&lt;SPAN&gt; property but I can't see the equivalent for Dynamic or Tiled layers.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The goal is to zoom to the extent of the layer once it's been added.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Steve&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Jan 2012 22:51:56 GMT</pubDate>
    <dc:creator>StephenLead</dc:creator>
    <dc:date>2012-01-11T22:51:56Z</dc:date>
    <item>
      <title>How to obtain the extent of a layer programatically</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-obtain-the-extent-of-a-layer/m-p/572662#M53492</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Take an example of a &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer" rel="nofollow" target="_blank"&gt;Map Service&lt;/A&gt;&lt;SPAN&gt; in the REST API. This contains an Initial Extent and Full Extent:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;STRONG&gt;Intial Extent: &lt;/STRONG&gt;&lt;BR /&gt;XMin: -207.682974279982&lt;BR /&gt;YMin: -40.6075371681153&lt;BR /&gt;XMax: -37.1804225764967&lt;BR /&gt;YMax: 129.89501453537&lt;BR /&gt;Spatial Reference: 4269&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When creating a new Tiled or Dynamic layer from this service, the Initial Extent and Full Extent are listed as null in FireBug. How can these values be obtained programmatically? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Feature Layer contains a &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/featurelayer.htm#fullExtent" rel="nofollow" target="_blank"&gt;fullExtent&lt;/A&gt;&lt;SPAN&gt; property but I can't see the equivalent for Dynamic or Tiled layers.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The goal is to zoom to the extent of the layer once it's been added.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Steve&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jan 2012 22:51:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-obtain-the-extent-of-a-layer/m-p/572662#M53492</guid>
      <dc:creator>StephenLead</dc:creator>
      <dc:date>2012-01-11T22:51:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to obtain the extent of a layer programatically</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-obtain-the-extent-of-a-layer/m-p/572663#M53493</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Use if (layer.loaded) to make sure you can access those properties. Or, you may want to connect to the "onLoad" event.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Please see details at:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/layer.htm#loaded" rel="nofollow" target="_blank"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi/layer.htm#loaded&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Jan 2012 22:59:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-obtain-the-extent-of-a-layer/m-p/572663#M53493</guid>
      <dc:creator>JianHuang</dc:creator>
      <dc:date>2012-01-11T22:59:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to obtain the extent of a layer programatically</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-obtain-the-extent-of-a-layer/m-p/572664#M53494</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks, this works:&lt;/SPAN&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; 
basemap = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer");
map.addLayer(basemap);
dojo.connect(basemap, "onLoad", function() {
&amp;nbsp;&amp;nbsp; alert(basemap.fullExtent.xmin);
});&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:39:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-obtain-the-extent-of-a-layer/m-p/572664#M53494</guid>
      <dc:creator>StephenLead</dc:creator>
      <dc:date>2021-12-12T00:39:31Z</dc:date>
    </item>
  </channel>
</rss>

