Select to view content in your preferred language

4.24 Geometry($feature).z

344
2
10-23-2022 02:07 AM
Wade
by
New Contributor III

The current version doesn't seem to work?

 

sceneView.on('layerview-create', function (event) {
            const mLayer = webScene.allLayers.filter((elem) => {
                return elem.title === "TEST LAYER";
            }).items[0];

            const currentElevationInfo = {
                mode: "absolute-height",
                offset: 0,
                featureExpressionInfo: {
                    expression: "Geometry($feature).z * 100"
                },
                unit: "meters"
            };

            mLayer.elevationInfo = currentElevationInfo;
        }
    });

 

0 Kudos
2 Replies
by Anonymous User
Not applicable

Hi @Wade 

Thanks for reaching out! Just from looking at the code I cannot find any mistakes, and also the sample we provide still seems to work.

So could you maybe provide us with a working codepen example where the problem is visible? Maybe the issue here is not the Arcade expression but something else, so I would be happy to help you debug. It could be that the layer does not have any z-values stored for example. 

Best, 

Daniel

0 Kudos
Wade
by
New Contributor III

Hi @Anonymous User 

Thank you, I found the possible reason, it should be the reason for publishing the service, 3d to multipatch.

0 Kudos