<?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: JavaScript ArcGIS: Update scene clipping area after creation in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-arcgis-update-scene-clipping-area-after/m-p/1202789#M78289</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/609231"&gt;@Serbian&lt;/a&gt;!&lt;/P&gt;&lt;P&gt;Looks like you use one level of&amp;nbsp; `extents` too many in your code. Try instead:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;let extent = view.clippingArea.clone();
extent.xmax = 1849093;
extent.xmin = 1488933;
extent.ymax = 5921967;
extent.ymin = 5688179;

view.clippingArea = extent;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Alternatively, you can also substitute the whole clippingArea with a new Extent at once (without cloning):&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;view.clippingArea = {
  // autocasts as new Extent()
  xmax: 1849093,
  xmin: 1488933,
  ymax: 5921967,
  ymin: 5688179,
  spatialReference: {
    // autocasts as new SpatialReference()
    wkid: 3857 // Make sure this is the wkid of the spatial reference your view uses!
  }
};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's a sample app which switches between 3 different clipping extents:&amp;nbsp;&lt;A href="https://codepen.io/gsoosalu/pen/MWVPREJ" target="_blank" rel="noopener"&gt;https://codepen.io/gsoosalu/pen/MWVPREJ&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 15 Aug 2022 13:04:29 GMT</pubDate>
    <dc:creator>GreteSoosalu</dc:creator>
    <dc:date>2022-08-15T13:04:29Z</dc:date>
    <item>
      <title>JavaScript ArcGIS: Update scene clipping area after creation</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-arcgis-update-scene-clipping-area-after/m-p/1201253#M78240</link>
      <description>&lt;P&gt;I want to update (increase / decrease) scene clipping area after I create it. My goal is to give the user ability to adjust the clipping area. I am using scene view, if that's relevent.&lt;/P&gt;&lt;P&gt;I've managed to update the clipping area of the map using:&lt;/P&gt;&lt;PRE&gt;const extent = view.clippingArea.clone();
view.clippingArea = extent.expand(0.5);&lt;/PRE&gt;&lt;P&gt;However when I try to set it to a specific range it does not want work:&lt;/P&gt;&lt;PRE&gt;let extent = view.clippingArea.clone();
extent.extent.xmax = 1849093
extent.extent.xmin = 1488933
extent.extent.ymax = 5921967
extent.extent.ymin = 5688179

view.clippingArea = extent&lt;/PRE&gt;&lt;P&gt;How can &lt;A href="https://www.forkliftbatterymanufacturer.com/" target="_self"&gt;I&lt;/A&gt; set clipping area to specific range.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2022 12:03:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-arcgis-update-scene-clipping-area-after/m-p/1201253#M78240</guid>
      <dc:creator>Serbian</dc:creator>
      <dc:date>2022-08-16T12:03:39Z</dc:date>
    </item>
    <item>
      <title>Re: JavaScript ArcGIS: Update scene clipping area after creation</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-arcgis-update-scene-clipping-area-after/m-p/1202789#M78289</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/609231"&gt;@Serbian&lt;/a&gt;!&lt;/P&gt;&lt;P&gt;Looks like you use one level of&amp;nbsp; `extents` too many in your code. Try instead:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;let extent = view.clippingArea.clone();
extent.xmax = 1849093;
extent.xmin = 1488933;
extent.ymax = 5921967;
extent.ymin = 5688179;

view.clippingArea = extent;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Alternatively, you can also substitute the whole clippingArea with a new Extent at once (without cloning):&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;view.clippingArea = {
  // autocasts as new Extent()
  xmax: 1849093,
  xmin: 1488933,
  ymax: 5921967,
  ymin: 5688179,
  spatialReference: {
    // autocasts as new SpatialReference()
    wkid: 3857 // Make sure this is the wkid of the spatial reference your view uses!
  }
};&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's a sample app which switches between 3 different clipping extents:&amp;nbsp;&lt;A href="https://codepen.io/gsoosalu/pen/MWVPREJ" target="_blank" rel="noopener"&gt;https://codepen.io/gsoosalu/pen/MWVPREJ&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Aug 2022 13:04:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/javascript-arcgis-update-scene-clipping-area-after/m-p/1202789#M78289</guid>
      <dc:creator>GreteSoosalu</dc:creator>
      <dc:date>2022-08-15T13:04:29Z</dc:date>
    </item>
  </channel>
</rss>

