<?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: Set start location based on extents rather than a centre point and zoom in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-start-location-based-on-extents-rather-than-a/m-p/698852#M65082</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to require any class you use in your code. So yes you need to add "esri/geometry/Extent"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Feb 2017 15:06:24 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2017-02-01T15:06:24Z</dc:date>
    <item>
      <title>Set start location based on extents rather than a centre point and zoom</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-start-location-based-on-extents-rather-than-a/m-p/698849#M65079</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The JS API samples show how to create a map, but the starting location/zoom is&amp;nbsp;always based on a Lat,Lng pair along with a zoom level.&amp;nbsp;Is it possible to override these parameter using a bounding box coordinate pair, or similar and the centre + zoom level is picked up automatically from there?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;API Samples usually have:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN class="" style="color: #595959;"&gt;map &lt;/SPAN&gt;&lt;SPAN class="" style="color: #666600;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #595959;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #333333; font-weight: bold;"&gt;new&lt;/SPAN&gt;&lt;SPAN class="" style="color: #595959;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #000000;"&gt;Map&lt;/SPAN&gt;&lt;SPAN class="" style="color: #666600;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #dd1144;"&gt;"map"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #666600;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="" style="color: #595959;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #666600;"&gt;{&lt;/SPAN&gt;&lt;SPAN class="" style="color: #595959;"&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; basemap&lt;/SPAN&gt;&lt;SPAN class="" style="color: #666600;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="" style="color: #595959;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #dd1144;"&gt;"topo"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #666600;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="" style="color: #595959;"&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; center&lt;/SPAN&gt;&lt;SPAN class="" style="color: #666600;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="" style="color: #595959;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #666600;"&gt;[-&lt;/SPAN&gt;&lt;SPAN class="" style="color: #009999;"&gt;108.663&lt;/SPAN&gt;&lt;SPAN class="" style="color: #666600;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="" style="color: #595959;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #009999;"&gt;42.68&lt;/SPAN&gt;&lt;SPAN class="" style="color: #666600;"&gt;],&lt;/SPAN&gt;&lt;SPAN class="" style="color: #595959;"&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; zoom&lt;/SPAN&gt;&lt;SPAN class="" style="color: #666600;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="" style="color: #595959;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #009999;"&gt;6&lt;/SPAN&gt;&lt;SPAN class="" style="color: #595959;"&gt;
&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #666600;"&gt;}&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Whereas I would need something like:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN class="" style="color: #595959;"&gt;map &lt;/SPAN&gt;&lt;SPAN class="" style="color: #666600;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="" style="color: #595959;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #333333; font-weight: bold;"&gt;new&lt;/SPAN&gt;&lt;SPAN class="" style="color: #595959;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #000000;"&gt;Map&lt;/SPAN&gt;&lt;SPAN class="" style="color: #666600;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #dd1144;"&gt;"map"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #666600;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="" style="color: #595959;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #666600;"&gt;{&lt;/SPAN&gt;&lt;SPAN class="" style="color: #595959;"&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; basemap&lt;/SPAN&gt;&lt;SPAN class="" style="color: #666600;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="" style="color: #595959;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #dd1144;"&gt;"topo"&lt;/SPAN&gt;&lt;SPAN class="" style="color: #666600;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="" style="color: #595959;"&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; bounds&lt;/SPAN&gt;&lt;SPAN class="" style="color: #666600;"&gt;:&lt;/SPAN&gt;&lt;SPAN class="" style="color: #595959;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #666600;"&gt;[-&lt;/SPAN&gt;&lt;SPAN class="" style="color: #009999;"&gt;10&lt;STRONG&gt;8&lt;/STRONG&gt;.663&lt;/SPAN&gt;&lt;SPAN class="" style="color: #666600;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="" style="color: #595959;"&gt; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #009999;"&gt;4&lt;STRONG&gt;2&lt;/STRONG&gt;.68;-10&lt;STRONG&gt;7&lt;/STRONG&gt;.63, 4&lt;STRONG&gt;3&lt;/STRONG&gt;.68&lt;/SPAN&gt;&lt;SPAN class="" style="color: #666600;"&gt;]&lt;/SPAN&gt;&lt;SPAN class="" style="color: #595959;"&gt;
&lt;/SPAN&gt;&lt;SPAN class="" style="color: #595959;"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="" style="color: #666600;"&gt;}&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the zoom takes care of itself and it isn't required.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help you can offer. Used to doing this through Google Maps API, now trying to switch over to the JS API for the increased GIS functionality.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 05:24:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-start-location-based-on-extents-rather-than-a/m-p/698849#M65079</guid>
      <dc:creator>BrendanCunningham1</dc:creator>
      <dc:date>2021-12-12T05:24:46Z</dc:date>
    </item>
    <item>
      <title>Re: Set start location based on extents rather than a centre point and zoom</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-start-location-based-on-extents-rather-than-a/m-p/698850#M65080</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;BC,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Sure you can but it is not called bounds it is extent&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&amp;nbsp; &lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; map &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Map&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"map"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; extent&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Extent&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;xmin&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;20098296&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;ymin&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;-&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2804413&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;xmax&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;5920428&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;ymax&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;15813776&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;spatialReference&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;wkid&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;54032&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 05:24:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-start-location-based-on-extents-rather-than-a/m-p/698850#M65080</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2021-12-12T05:24:49Z</dc:date>
    </item>
    <item>
      <title>Re: Set start location based on extents rather than a centre point and zoom</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-start-location-based-on-extents-rather-than-a/m-p/698851#M65081</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot Robert,&lt;/P&gt;&lt;P&gt;I'm definitely getting closer. But getting this error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Uncaught ReferenceError: Extent is not defined&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; at index.html:55&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; at fa (init.js:28)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; at init.js:28&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; at ga (init.js:28)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; at da (init.js:28)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; at s (init.js:30)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; at HTMLScriptElement.&amp;lt;anonymous&amp;gt; (init.js:35)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do I need to declare Extent somewhere or should it be already available?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Feb 2017 15:01:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-start-location-based-on-extents-rather-than-a/m-p/698851#M65081</guid>
      <dc:creator>BrendanCunningham1</dc:creator>
      <dc:date>2017-02-01T15:01:16Z</dc:date>
    </item>
    <item>
      <title>Re: Set start location based on extents rather than a centre point and zoom</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-start-location-based-on-extents-rather-than-a/m-p/698852#M65082</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to require any class you use in your code. So yes you need to add "esri/geometry/Extent"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Feb 2017 15:06:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-start-location-based-on-extents-rather-than-a/m-p/698852#M65082</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2017-02-01T15:06:24Z</dc:date>
    </item>
    <item>
      <title>Re: Set start location based on extents rather than a centre point and zoom</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-start-location-based-on-extents-rather-than-a/m-p/698853#M65083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Robert,&lt;/P&gt;&lt;P&gt;Still no map, unfortunately. I am looking for a default load bounding box, and not the extents that a user can pan to.&lt;/P&gt;&lt;P&gt;Beginning to see how the API is working, but &amp;nbsp;can't see the end result here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;script src="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fjs.arcgis.com%2F3.19%2F" rel="nofollow" target="_blank"&gt;https://js.arcgis.com/3.19/&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&amp;lt;/script&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt; &amp;lt;script&amp;gt;&lt;BR /&gt; var map;&lt;/P&gt;&lt;P&gt;require(["esri/map", "esri/geometry/Extent", "dojo/domReady!"], function(Map,Extent) {&lt;BR /&gt; map = new Map("map", {&lt;BR /&gt; extent: new Extent({xmin:-20098296,ymin:-2804413,xmax:5920428,ymax:15813776,spatialReference:{wkid:54032}})&lt;BR /&gt; });&lt;BR /&gt; });&lt;BR /&gt; &amp;lt;/script&amp;gt;&lt;BR /&gt; &amp;lt;/head&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;body&amp;gt;&lt;BR /&gt; &amp;lt;div id="map"&amp;gt;&amp;lt;/div&amp;gt;&lt;BR /&gt; &amp;lt;/body&amp;gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Feb 2017 15:51:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-start-location-based-on-extents-rather-than-a/m-p/698853#M65083</guid>
      <dc:creator>BrendanCunningham1</dc:creator>
      <dc:date>2017-02-01T15:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: Set start location based on extents rather than a centre point and zoom</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-start-location-based-on-extents-rather-than-a/m-p/698854#M65084</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah haaaa...&lt;/P&gt;&lt;P&gt;I hadn't declared SpatialReference either!&lt;/P&gt;&lt;P&gt;All working great now.&lt;/P&gt;&lt;P&gt;Thanks a lot Robert, and so the adventure starts...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Feb 2017 15:58:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-start-location-based-on-extents-rather-than-a/m-p/698854#M65084</guid>
      <dc:creator>BrendanCunningham1</dc:creator>
      <dc:date>2017-02-01T15:58:38Z</dc:date>
    </item>
  </channel>
</rss>

