<?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: how to get the extent boundary values for any US state. in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-the-extent-boundary-values-for-any-us/m-p/1085923#M74145</link>
    <description>&lt;P&gt;Is that place in the ocean just of the coast of Africa? You have to account for the spatial reference, which is in meters, not decimal degrees.&lt;/P&gt;</description>
    <pubDate>Wed, 04 Aug 2021 20:18:07 GMT</pubDate>
    <dc:creator>KenBuja</dc:creator>
    <dc:date>2021-08-04T20:18:07Z</dc:date>
    <item>
      <title>how to get the extent boundary values for any US state.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-the-extent-boundary-values-for-any-us/m-p/1085918#M74144</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to know the extent boundary values for any US state in order to set the zoom view to that state on map load.&lt;/P&gt;&lt;P&gt;I got below extent boundary values from argis desktop by loading PA's census block shape file.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;"-80.5198510000000027,39.7197989999999947,-74.6895609999999976,42.5160720000000012"&lt;/P&gt;&lt;P&gt;When I set the defaultextent to these values the map zooms in to some ocean area which is incorrect.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;Chitra&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Aug 2021 20:13:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-the-extent-boundary-values-for-any-us/m-p/1085918#M74144</guid>
      <dc:creator>ChitraKrishnan</dc:creator>
      <dc:date>2021-08-04T20:13:45Z</dc:date>
    </item>
    <item>
      <title>Re: how to get the extent boundary values for any US state.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-the-extent-boundary-values-for-any-us/m-p/1085923#M74145</link>
      <description>&lt;P&gt;Is that place in the ocean just of the coast of Africa? You have to account for the spatial reference, which is in meters, not decimal degrees.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Aug 2021 20:18:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-the-extent-boundary-values-for-any-us/m-p/1085923#M74145</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2021-08-04T20:18:07Z</dc:date>
    </item>
    <item>
      <title>Re: how to get the extent boundary values for any US state.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-the-extent-boundary-values-for-any-us/m-p/1085925#M74146</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;I am trying to zoom in to Pennsylvania state in USA. I have set the spatialreference to&amp;nbsp;102100.&amp;nbsp;&lt;/P&gt;&lt;P&gt;are those extent values correct?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Chitra&lt;/P&gt;</description>
      <pubDate>Wed, 04 Aug 2021 20:22:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-the-extent-boundary-values-for-any-us/m-p/1085925#M74146</guid>
      <dc:creator>ChitraKrishnan</dc:creator>
      <dc:date>2021-08-04T20:22:19Z</dc:date>
    </item>
    <item>
      <title>Re: how to get the extent boundary values for any US state.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-the-extent-boundary-values-for-any-us/m-p/1085933#M74147</link>
      <description>&lt;P&gt;That's the WKID of the Web Mercator projection. For geographic coordinates (WGS84), use 4326&lt;/P&gt;</description>
      <pubDate>Wed, 04 Aug 2021 20:33:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-the-extent-boundary-values-for-any-us/m-p/1085933#M74147</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2021-08-04T20:33:49Z</dc:date>
    </item>
    <item>
      <title>Re: how to get the extent boundary values for any US state.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-the-extent-boundary-values-for-any-us/m-p/1085936#M74150</link>
      <description>&lt;P&gt;Here's an example, using your coordinates&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;&amp;lt;html&amp;gt;
  &amp;lt;head&amp;gt;
    &amp;lt;meta charset="utf-8" /&amp;gt;
    &amp;lt;meta
      name="viewport"
      content="initial-scale=1,maximum-scale=1,user-scalable=no"
    /&amp;gt;
    &amp;lt;title&amp;gt;
      Intro to MapView - Create a 2D map | Sample | ArcGIS API for JavaScript
      4.20
    &amp;lt;/title&amp;gt;
    &amp;lt;style&amp;gt;
      html,
      body,
      #viewDiv {
        padding: 0;
        margin: 0;
        height: 100%;
        width: 100%;
      }
    &amp;lt;/style&amp;gt;

    &amp;lt;link
      rel="stylesheet"
      href="https://js.arcgis.com/4.20/esri/themes/light/main.css"
    /&amp;gt;
    &amp;lt;script src="https://js.arcgis.com/4.20/"&amp;gt;&amp;lt;/script&amp;gt;

    &amp;lt;script&amp;gt;
      require(["esri/Map", "esri/views/MapView"], (Map, MapView) =&amp;gt; {
        const map = new Map({
          basemap: "topo-vector"
        });

        const view = new MapView({
          container: "viewDiv",
          map: map,
          extent: {
            // autocasts as new Extent()
            xmin: -80.5198510000000027,
            ymin: 39.7197989999999947,
            xmax: -74.6895609999999976,
            ymax: 42.5160720000000012,
            spatialReference: 4326
          }
        });
      });
    &amp;lt;/script&amp;gt;
  &amp;lt;/head&amp;gt;

  &amp;lt;body&amp;gt;
    &amp;lt;div id="viewDiv"&amp;gt;&amp;lt;/div&amp;gt;
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Aug 2021 20:39:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-the-extent-boundary-values-for-any-us/m-p/1085936#M74150</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2021-08-04T20:39:12Z</dc:date>
    </item>
    <item>
      <title>Re: how to get the extent boundary values for any US state.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-the-extent-boundary-values-for-any-us/m-p/1085947#M74152</link>
      <description>&lt;P&gt;You could just submit query to something like &lt;A href="https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/services/USA_States_Generalized/FeatureServer" target="_blank"&gt;Esri's generalized states layer&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Specifying something like the state abbreviation and asking for the extent only will return an object you could easily pass to a map. For example, &lt;A href="https://services.arcgis.com/P3ePLMYs2RVChkJx/ArcGIS/rest/services/USA_States_Generalized/FeatureServer/0/query?where=STATE_ABBR%3D%27PA%27&amp;amp;returnExtentOnly=true&amp;amp;f=pjson" target="_self"&gt;here's a query for PA&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;params&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;where = "STATE_ABBR='PA'"&lt;/LI&gt;&lt;LI&gt;returnExtentOnly = true&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;returns&lt;/P&gt;&lt;PRE&gt;{"extent" : {
    "xmin" : -8964118.3457209859, 
    "ymin" : 4825237.1400024248, 
    "xmax" : -8315572.9094515787, 
    "ymax" : 5201108.2423584638, 
    "spatialReference" : {
      "wkid" : 102100, 
      "latestWkid" : 3857
    }
  }
}&lt;/PRE&gt;</description>
      <pubDate>Wed, 04 Aug 2021 21:00:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-the-extent-boundary-values-for-any-us/m-p/1085947#M74152</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2021-08-04T21:00:09Z</dc:date>
    </item>
    <item>
      <title>Re: how to get the extent boundary values for any US state.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-the-extent-boundary-values-for-any-us/m-p/1086114#M74160</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;It works like a charm after changing the spatialReference to 4326. Thank you very much!!&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Chitra&lt;/P&gt;</description>
      <pubDate>Thu, 05 Aug 2021 12:50:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-the-extent-boundary-values-for-any-us/m-p/1086114#M74160</guid>
      <dc:creator>ChitraKrishnan</dc:creator>
      <dc:date>2021-08-05T12:50:35Z</dc:date>
    </item>
    <item>
      <title>Re: how to get the extent boundary values for any US state.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-the-extent-boundary-values-for-any-us/m-p/1086115#M74161</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/363906"&gt;@jcarlson&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much for that note. I got to know a new feature layer. It works like a charm!!!&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Chitra&lt;/P&gt;</description>
      <pubDate>Thu, 05 Aug 2021 12:52:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-the-extent-boundary-values-for-any-us/m-p/1086115#M74161</guid>
      <dc:creator>ChitraKrishnan</dc:creator>
      <dc:date>2021-08-05T12:52:23Z</dc:date>
    </item>
  </channel>
</rss>

