<?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 &amp;quot;fullExtent&amp;quot; of Map/WebMap? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-quot-fullextent-quot-of-map-webmap/m-p/1262021#M80392</link>
    <description>&lt;P&gt;That's for an individual layer, which is fine, but I'm asking about the whole Map/WebMap, which is created in the way specified in the original post.&amp;nbsp; Such a Map/WebMap has multiple layers--and even potentially multiple base layers.&amp;nbsp;&lt;/P&gt;&lt;P&gt;My goal is to discover this full extent for a generic MapView (without regard to its arbitrary display size) and--essentially--turn that into a MapView constraint (and, further, to capture the maxScale and turn that into a constraint as well).&amp;nbsp; I want to explicitly cement the extents at which the map may render.&lt;/P&gt;&lt;P&gt;What I'm doing at the moment is unsatisfying for many reasons.&amp;nbsp; (See below where I fetch these values--&lt;EM&gt;ick&lt;/EM&gt;.)&amp;nbsp; I'm looking for an approved, generic solution.&amp;nbsp; (E.g., do I start taking extent unions?)&amp;nbsp; I ask because I feel like either a way to do this must already exist or there's something quite wrong with my assumptions.&lt;BR /&gt;&lt;BR /&gt;Getting the full extent (and max scale) for a generic Map or Webmap (ick):&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;const&lt;/SPAN&gt; &lt;SPAN&gt;baseLayers&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;view&lt;/SPAN&gt;&lt;SPAN&gt;?.&lt;/SPAN&gt;&lt;SPAN&gt;map&lt;/SPAN&gt;&lt;SPAN&gt;?.&lt;/SPAN&gt;&lt;SPAN&gt;basemap&lt;/SPAN&gt;&lt;SPAN&gt;?.&lt;/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t;&lt;SPAN&gt;)?.&lt;/SPAN&gt;&lt;SPAN&gt;maxScale&lt;/SPAN&gt;&lt;SPAN&gt; ? (&lt;/SPAN&gt;&lt;SPAN&gt;baseLayer&lt;/SPAN&gt; &lt;SPAN&gt;as&lt;/SPAN&gt; &lt;SPAN&gt;any&lt;/SPAN&gt;&lt;SPAN&gt;)?.&lt;/SPAN&gt;&lt;SPAN&gt;maxScale&lt;/SPAN&gt;&lt;SPAN&gt; : &lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;</description>
    <pubDate>Mon, 27 Feb 2023 16:25:32 GMT</pubDate>
    <dc:creator>TonyGraham</dc:creator>
    <dc:date>2023-02-27T16:25:32Z</dc:date>
    <item>
      <title>How to get "fullExtent" of Map/WebMap?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-quot-fullextent-quot-of-map-webmap/m-p/1260296#M80324</link>
      <description>&lt;P&gt;For any arbitrary Map (e.g., &lt;FONT face="andale mono,times"&gt;new Map({ basemap: “osm” })&lt;/FONT&gt;) or WebMap (e.g., &lt;FONT face="andale mono,times"&gt;new WebMap({portalitem: { id: “123” }})&lt;/FONT&gt;), I think I see that the “initialExtent” is returned by the MapView’s “extent”.&lt;/P&gt;&lt;P&gt;How can I most aptly acquire the “fullExtent” for the MapView?&lt;/P&gt;&lt;P&gt;Where “initialExtent” and “fullExtent” are analogous to what gets returned from querying a single layer or MapServer (e.g., &lt;A href="https://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Base/MapServer?f=json" target="_blank"&gt;https://services.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Dark_Gray_Base/MapServer?f=json&lt;/A&gt;).&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2023 23:03:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-quot-fullextent-quot-of-map-webmap/m-p/1260296#M80324</guid>
      <dc:creator>TonyGraham</dc:creator>
      <dc:date>2023-02-21T23:03:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to get "fullExtent" of Map/WebMap?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-quot-fullextent-quot-of-map-webmap/m-p/1260969#M80357</link>
      <description>&lt;P&gt;Hi there,&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can get the fullExtent of the layer once the layer is loaded.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;// Get the fullExtent of the layer when layer is loaded
view.whenLayerView(layer).then(()=&amp;gt;{
  console.log(layer.fullExtent);
  view.goTo(layer.fullExtent);
});&lt;/LI-CODE&gt;&lt;P&gt;Hope this helps&lt;/P&gt;</description>
      <pubDate>Thu, 23 Feb 2023 16:35:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-quot-fullextent-quot-of-map-webmap/m-p/1260969#M80357</guid>
      <dc:creator>UndralBatsukh</dc:creator>
      <dc:date>2023-02-23T16:35:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to get "fullExtent" of Map/WebMap?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-quot-fullextent-quot-of-map-webmap/m-p/1262021#M80392</link>
      <description>&lt;P&gt;That's for an individual layer, which is fine, but I'm asking about the whole Map/WebMap, which is created in the way specified in the original post.&amp;nbsp; Such a Map/WebMap has multiple layers--and even potentially multiple base layers.&amp;nbsp;&lt;/P&gt;&lt;P&gt;My goal is to discover this full extent for a generic MapView (without regard to its arbitrary display size) and--essentially--turn that into a MapView constraint (and, further, to capture the maxScale and turn that into a constraint as well).&amp;nbsp; I want to explicitly cement the extents at which the map may render.&lt;/P&gt;&lt;P&gt;What I'm doing at the moment is unsatisfying for many reasons.&amp;nbsp; (See below where I fetch these values--&lt;EM&gt;ick&lt;/EM&gt;.)&amp;nbsp; I'm looking for an approved, generic solution.&amp;nbsp; (E.g., do I start taking extent unions?)&amp;nbsp; I ask because I feel like either a way to do this must already exist or there's something quite wrong with my assumptions.&lt;BR /&gt;&lt;BR /&gt;Getting the full extent (and max scale) for a generic Map or Webmap (ick):&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;const&lt;/SPAN&gt; &lt;SPAN&gt;baseLayers&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;view&lt;/SPAN&gt;&lt;SPAN&gt;?.&lt;/SPAN&gt;&lt;SPAN&gt;map&lt;/SPAN&gt;&lt;SPAN&gt;?.&lt;/SPAN&gt;&lt;SPAN&gt;basemap&lt;/SPAN&gt;&lt;SPAN&gt;?.&lt;/SPAN&gt;&lt;SPAN&gt;baseLayers&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;const&lt;/SPAN&gt; &lt;SPAN&gt;baseLayer&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;baseLayers&lt;/SPAN&gt;&lt;SPAN&gt; &amp;amp;&amp;amp; &lt;/SPAN&gt;&lt;SPAN&gt;baseLayers&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;length&lt;/SPAN&gt; &lt;SPAN&gt;&amp;gt;&lt;/SPAN&gt; &lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt; ? &lt;/SPAN&gt;&lt;SPAN&gt;baseLayers&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;getItemAt&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;) : &lt;/SPAN&gt;&lt;SPAN&gt;null&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SP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; : [&lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;];&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;const&lt;/SPAN&gt; &lt;SPAN&gt;maxScale&lt;/SPAN&gt;&lt;SPAN&gt; = (&lt;/SPAN&gt;&lt;SPAN&gt;baseLayer&lt;/SPAN&gt; &lt;SPAN&gt;as&lt;/SPAN&gt; &lt;SPAN&gt;any&lt;/SPAN&gt;&lt;SPAN&gt;)?.&lt;/SPAN&gt;&lt;SPAN&gt;maxScale&lt;/SPAN&gt;&lt;SPAN&gt; ? (&lt;/SPAN&gt;&lt;SPAN&gt;baseLayer&lt;/SPAN&gt; &lt;SPAN&gt;as&lt;/SPAN&gt; &lt;SPAN&gt;any&lt;/SPAN&gt;&lt;SPAN&gt;)?.&lt;/SPAN&gt;&lt;SPAN&gt;maxScale&lt;/SPAN&gt;&lt;SPAN&gt; : &lt;/SPAN&gt;&lt;SPAN&gt;0&lt;/SPAN&gt;&lt;SPAN&gt;;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 27 Feb 2023 16:25:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-quot-fullextent-quot-of-map-webmap/m-p/1262021#M80392</guid>
      <dc:creator>TonyGraham</dc:creator>
      <dc:date>2023-02-27T16:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to get "fullExtent" of Map/WebMap?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-quot-fullextent-quot-of-map-webmap/m-p/1262044#M80393</link>
      <description>&lt;P&gt;For webmaps you need to use the&amp;nbsp;viewPoint property on&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-WebMap.html#initialViewProperties" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-WebMap.html#initialViewProperties.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-Viewpoint.html" target="_self"&gt;Viewpoint&lt;/A&gt; - has scale and targetGeometry which are used to set the scale, center or extent of the MapView.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Feb 2023 17:21:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-get-quot-fullextent-quot-of-map-webmap/m-p/1262044#M80393</guid>
      <dc:creator>UndralBatsukh</dc:creator>
      <dc:date>2023-02-27T17:21:29Z</dc:date>
    </item>
  </channel>
</rss>

