I have users that compare (visually) elevations of different features in a JS API 4.11 SceneView. I've noticed different behavior based on whether the SceneView viewingMode is global or local in the application, and I was hoping someone could explain it to me so I can explain it to my users.
For example, I have a roughly 40x40 mile polygon extruded to 16500 feet, and then plot a plane flight path that does not get higher than 16400 feet. When the SceneView viewingMode is set to global, the plane appears above the extruded polygon (by about 330 feet). But when the viewingMode attribute is set to local, the plane, as expected, appears below the roof of the polygon. Please see attachments for screenshots.
I was hoping someone could explain to me why this is happening.
I wonder if it has to do with the earth curvature? Extruded polygons only extrude around the edges, and thus the polygon interior is flat. On a globe, the closer to the center of the polygon you are the lower it will be.
@JohnGrayson Very interesting - I guess that would explain it, though it doesn't really make it easier to explain to my users. So the top of an extruded polygon will be closer to the ground in the center than the edges because it's only extruded at the edges and the earth curvature is convex w/r/t the polygon (see image).
John and Jay, you are right, that is how polygons are currently extruded on the globe. The top of the extrusion is a plane, it doesn't follow the curvature of the Earth.