-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(cesium): support altitude modes via ground primitives #493
feat(cesium): support altitude modes via ground primitives #493
Conversation
This addresses lines/polygons either drawn by the user or from data sources. In addition, getCoordinateFromPixel was improved with Cesium's recommendation.
Note that this does not address Measure Lines. The calculation for those is following the surface of the ellipsoid, and therefore that is where they will be drawn. We certainly have the capability to do that calculation over terrain should anyone request it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you do a |
Doing |
|
|
|
That is the same thing that Kevin mentioned. It has to do with polygon fills and I'm looking into it. |
Also use constants where appropriate.
For the interpolation granularity (affecting clipping through the earth), we could simply enable Cesium's interpolation in addition to ours. In the event that ours is at the default 100km or greater, the polygon on our side will keep the same number of vertices and only the Cesium primitive will have more at their default of 9.999km. This does appear to be a little chunky (slow) in my tests though (largely because drawn items are rendered with Edit: I'm gonna push this and see how it looks for you |
Just don't forget to put Settings > Interpolation > Granularity back to 100km. |
|
Setting these items appears to fix the globe rendering issues.
Most of it is solved by the second one, so we may want to leave |
I think this is ready to go other than deciding whether or not |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- The create/edit place controls don't seem to update the feature/label consistently. Using Relative to Ground, changing the altitude updates both the feature/label. With Absolute, changing the altitude only updates the feature. Turning on Clamp to Ground updates the label but not the feature.
- When terrain is enabled, Relative to Ground positions the label correctly but the feature still uses absolute positioning.
- Changing Altitude Mode for lines/polygons doesn't update the preview feature. It does update the feature when you finish editing.
- Altitude Mode on lines/polygons isn't saved correctly on application refresh. It seems to use absolute positioning on the feature, but editing the place always populates Clamp to Ground.
- My personal preference would be disabling
highDynamicRange
. Visually I think it's too dark/muted and reduces contrast between tiles/features, making it harder to distinguish what you're looking at.
such as extrude, tessellate, and altitudeMode
I think all of those issues are fixed. I'll note that Cesium does not actually support |
clampToGround is implemented on Polyline and Primitive (polygon) not as a heightReference value but as separate classes (GroundPolylinePrimitive and GroundPrimitive). Therefore, if the heightReference changes, we cannot update those primitives and must instead recreate them.
@wallw-bits
|
|
This addresses lines/polygons either drawn by the user or from data sources. In addition,
getCoordinateFromPixel
was improved with Cesium's recommendation for handling the terrain vs. ellipsoid cases.Tests:
General Features
Places
<altitudeMode>
tag being added to the KMLFeature Requests:
Discussions:
Scene.highDynamicRange