<?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: Issues to show point cloud density using javascript API in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issues-to-show-point-cloud-density-using/m-p/1116746#M75279</link>
    <description>&lt;P&gt;In the code snippet the function to handle the "&lt;SPAN&gt;pointsPerInch" is missing:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;        function pointsperinchValueChanged(event) {
          const newRenderer = pcLayer.renderer.clone();
          newRenderer.pointsPerInch = event.value;
          pcLayer.renderer = newRenderer;
        }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;The working sample in the sandbox:&lt;BR /&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/sandbox/?sample=layers-pointcloud-size-density" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/sample-code/sandbox/?sample=layers-pointcloud-size-density&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 15 Nov 2021 06:55:15 GMT</pubDate>
    <dc:creator>SaschaBrunnerCH</dc:creator>
    <dc:date>2021-11-15T06:55:15Z</dc:date>
    <item>
      <title>Issues to show point cloud density using javascript API</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issues-to-show-point-cloud-density-using/m-p/1116655#M75276</link>
      <description>&lt;P&gt;I have a sample which shows how to change size and density of points in a PointCloudLayer. Each PointCloudLayer renderer has two properties:&amp;nbsp;pointSizeAlgorithm&amp;nbsp;and&amp;nbsp;pointsPerInch. One can change the point size and the other can change the point density.&lt;/P&gt;&lt;P&gt;For me , the point size is working fine, but I am facing issues with point density, whatever I select on my bar, &lt;A href="https://www.lithiumbatterychina.com" target="_self"&gt;i&lt;/A&gt;t didn’t reflect in the map.&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;PRE&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;
      PointCloudLayer - change point size and density | Sample | ArcGIS API for
      JavaScript 4.21
    &amp;lt;/title&amp;gt;
    &amp;lt;style&amp;gt;
      html,
      body,
      #viewDiv {
        padding: 0;
        margin: 0;
        height: 100%;
        width: 100%;
      }

      #paneDiv {
        width: 270px;
        padding: 15px;
        font-size: 14px;
      }

      .title {
        margin-bottom: 10px;
        font-size: 16px;
        font-weight: bold;
      }

      .slider {
        margin: 20px 0;
        height: 40px;
        width: 95%;
      }
    &amp;lt;/style&amp;gt;

    &amp;lt;link
      rel="stylesheet"
      href="https://js.arcgis.com/4.21/esri/themes/light/main.css"
    /&amp;gt;
    &amp;lt;script src="https://js.arcgis.com/4.21/"&amp;gt;&amp;lt;/script&amp;gt;

    &amp;lt;script&amp;gt;
      require([
        "esri/Map",
        "esri/views/SceneView",
        "esri/layers/PointCloudLayer",
        "esri/widgets/Slider"
      ], (Map, SceneView, PointCloudLayer, Slider) =&amp;gt; {
        // create slider for point size
        const selectedPointsSize = 5;
        const pointsizeSlider = new Slider({
          container: "point-size-slider",
          min: 1,
          max: 15,
          values: [selectedPointsSize],
          steps: 0.5,
          snapOnClickEnabled: false,
          visibleElements: {
            labels: true,
            rangeLabels: true
          }
        });
        // watch for changes on the sliders and update the renderer according to the new values
        pointsizeSlider.on(
          ["thumb-change", "thumb-drag"],
          pointsizeValueChanged
        );
        function pointsizeValueChanged(event) {
          const newRenderer = pcLayer.renderer.clone();
          newRenderer.pointSizeAlgorithm.size = event.value;
          pcLayer.renderer = newRenderer;
        }

        // create slider for point size
        const selectedPointsPerInch = 5;
        const pointsperinchSlider = new Slider({
          container: "points-per-inch-slider",
          min: 1,
          max: 40,
          values: [selectedPointsPerInch],
          steps: 1,
          snapOnClickEnabled: false,
          visibleElements: {
            labels: true,
            rangeLabels: true
          }
        });
        // watch for changes on the sliders and update the renderer according to the new values
        pointsperinchSlider.on(
          ["thumb-change", "thumb-drag"],
          pointsperinchValueChanged
        );
        

        // create map and view
        const map = new Map({
          basemap: "gray-vector",
          ground: "world-elevation"
        });

        const view = new SceneView({
          container: "viewDiv",
          map: map,
          camera: {
            heading: 210,
            tilt: 78,
            position: {
              x: -8249335,
              y: 4832005,
              z: 50.7,
              spatialReference: {
                wkid: 3857
              }
            }
          }
        });

        // create Point Cloud Layer with a renderer with set values for point size and point density
        const pcLayer = new PointCloudLayer({
          url: "https://tiles.arcgis.com/tiles/V6ZHFr6zdgNZuVG0/arcgis/rest/services/BARNEGAT_BAY_LiDAR_UTM/SceneServer",
          renderer: {
            type: "point-cloud-rgb", // autocasts as new pointCloudRGBRenderer()
            field: "RGB",
            pointSizeAlgorithm: {
              type: "fixed-size",
              useRealWorldSymbolSizes: false,
              size: 5
            },
            pointsPerInch: 5
          }
        });

        // add layer to the map
        map.add(pcLayer);
        // add panel to the map
        view.ui.add(document.getElementById("paneDiv"), "bottom-left");
      });
    &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;div id="paneDiv" class="esri-widget"&amp;gt;
      &amp;lt;div class="title"&amp;gt;Customize point cloud layer:&amp;lt;/div&amp;gt;
      &amp;lt;div&amp;gt;Point size:&amp;lt;/div&amp;gt;
      &amp;lt;div id="point-size-slider" class="slider"&amp;gt;&amp;lt;/div&amp;gt;
      &amp;lt;div&amp;gt;Points per inch:&amp;lt;/div&amp;gt;
      &amp;lt;div id="points-per-inch-slider" class="slider"&amp;gt;&amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sun, 14 Nov 2021 13:07:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issues-to-show-point-cloud-density-using/m-p/1116655#M75276</guid>
      <dc:creator>AbdulAleem</dc:creator>
      <dc:date>2021-11-14T13:07:47Z</dc:date>
    </item>
    <item>
      <title>Re: Issues to show point cloud density using javascript API</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issues-to-show-point-cloud-density-using/m-p/1116746#M75279</link>
      <description>&lt;P&gt;In the code snippet the function to handle the "&lt;SPAN&gt;pointsPerInch" is missing:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;        function pointsperinchValueChanged(event) {
          const newRenderer = pcLayer.renderer.clone();
          newRenderer.pointsPerInch = event.value;
          pcLayer.renderer = newRenderer;
        }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;The working sample in the sandbox:&lt;BR /&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/sample-code/sandbox/?sample=layers-pointcloud-size-density" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/sample-code/sandbox/?sample=layers-pointcloud-size-density&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Nov 2021 06:55:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issues-to-show-point-cloud-density-using/m-p/1116746#M75279</guid>
      <dc:creator>SaschaBrunnerCH</dc:creator>
      <dc:date>2021-11-15T06:55:15Z</dc:date>
    </item>
  </channel>
</rss>

