-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
EllipsoidTerrainProvider does not conform to the TerrainProvider interface #12485
Comments
@angrycat9000 I think this is expected, as If we can agree on that, then the fix here is that |
For consumers who know the implementation details. For a consumer just reading the documentation, passing
That still leaves the case where I would like to see the type interfaces / documentation to accurately reflect the implementation logic so there are fewer special situations where the consumer has to read the implementation to use the function. That makes it easier for consumers. There could be a number of ways to acheive this. Haven't dug that deep into the code to know which is the best effort to value ratio.
|
@angrycat9000 To confirm, we are talking about
|
Yes, sorry for the confusion. Edited to clarify |
What happened?
TerrainProvider has
availablity
defined asTileAvailablity
.cesium/packages/engine/Source/Core/TerrainProvider.js
Line 84 in 82e59ed
However
EllipsoidTerrainProvider
returnsundefined
foravailabilty
. This does not satisfyTileAvailabity
cesium/packages/engine/Source/Core/EllipsoidTerrainProvider.js
Line 123 in 82e59ed
Found this because
sampleHeightsMostDetailed
takes aTerrainProvider
but throws an error ifEllipsoidTerrainProvider
is passed.In the app I was working with the terrain provider may change based on user input. So there isn't a good way to have a single code path that gets the most detailed height. Had to put in a check to to see if the current terrain provider was in instance of
EllipsoidTerrainProvider
before callingsampleHeightsMostDetailed
Reproduction steps
No response
Sandcastle example
No response
Environment
No response
The text was updated successfully, but these errors were encountered: