Why all the entities of the layer are not displayed in the 3d scene of my web application using the ArcGIS API for JavaScript? layer of 1217 entities

684
3
03-20-2023 01:45 PM
Status: Closed
DanielLeón81
New Contributor III

I have an application that I have developed with the arcgis API for javascript. I am loading some layers that have 1217 entities and when I go to visualize them I do not see the total of the entities. I will leave some screenshots and part of the code where I load the layers.

 

GlobosinE.pngGlobosconE.png

 

In the first image is my designed application where you can only see some entities. In the second image you can see the layer in arcgis pro.

Part of the code:

      const aeroplane = new FeatureLayer({
        popupTemplate: {
          title: "Aeroplane",
          content: [
            {
              type: "fields",
              fieldInfos: [
                {
                  fieldName: "Number_of",
                  label: "Routes",
                },
                {
                  fieldName: "Number_o_1",
                  label: "Number of flights",
                },
                {
                  fieldName: "CO2_emitte",
                  label: "CO2 emitted (tons)",
                },
                {
                  fieldName: "Net_Spent",
                  label: "Net Spent (USD)",
                },
              ],
            },
          ],
          overwriteActions: false,
        },
      });
      scene.add(aeroplane);
      aeroplane.visible = false;

 

3 Comments
AndreasUlmer

The problem seems to be the layer's default elevation mode absolute-height, and the fact that all point entities have a z value (altitude) of zero.
Therefore some of the airplane icons (entities) are under ground and do not display.

There are different ways to address this, but the simplest way and what I would recommend: Set the layer's elevationMode to relative-to-ground
See 
* https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#elevatio...

https://developers.arcgis.com/javascript/latest/sample-code/scene-elevationinfo/

 

 

DanielLeón81

Thank you very much for your response. I will try

BjornSvensson
Status changed to: Closed

Closing this "idea" as it was more of a "question" and presumably the suggestion to change the layers elevationMode fixed the issue.