Conversation
For backwards compatibility we preserve the existing behavior of allowing an array of positions to be set. This makes the behavior more closely match the documentation. The ability to set an array of positions was undocumented, though some Sandcastle examples do this. This removes the need for conversion in PolygonGeometryUpdater at the point where the data is used.
…ositionsPacketData
Use CzmlDataSource.load in most tests. Compare against the values from the packet data rather than copy/pasting the expected values.
…d using intervals.
|
Thanks for the pull request @shunter!
Reviewers, don't forget to make sure that:
|
|
As an additional side note I spent some effort on code coverage for |
|
Awesome, thanks @shunter. Will look at this ASAP. |
| * @param {ReferenceFrame} referenceFrame The desired referenceFrame of the result. | ||
| * @param {Cartesian3} [result] The object to store the value into, if omitted, a new instance is created and returned. | ||
| * @returns {Cartesian3} The modified result parameter or a new instance if the result parameter was not supplied. | ||
| * @param {Cartesian3[]} [result] The object to store the value into, if omitted, a new instance is created and returned. |
There was a problem hiding this comment.
Should this say "array of objects" instead of "object"? And is it a breaking API change?
There was a problem hiding this comment.
Not a breaking change, the documentation was wrong, not the code.
|
Just to clarify, If the above is correct, I still think it's worth mentioning in CHANGES, even if we don't consider it a breaking change. Just treat it like a bug and state that it now always returns a PolygonHirearchy |
|
That's the only question/comment I have. Another flawless PR, thanks @shunter |
It would store whatever value was set into it, without really caring what it was, which is what nearly all properties do.
Yes, it was documented as a property of type |
|
Thanks, I'll merge once green. |
|
Thanks again @shunter! I couldn't find any "holes" in your work... |

Holes are specified as an array of arrays of positions. Polygon holes can be constant, interval-based, or defined as references. Using references allows for each vertex of the hole to be expressed as a sampled value. This is essentially the same limitations as the existing array of positions.
These changes also change the behavior of
PolygonGraphics.hierarchyto always produce aPolygonHierarchy.This makes the behavior more closely match the documentation. Previously,
CzmlDataSourcewould shove aCartesianarray into thehierarchyproperty, and then all use sites had compatibility logic to adapt. For backwards compatibility, we preserve the existing behavior of allowing an array of positions to be set. The ability to set an array of positions was undocumented, though some Sandcastle examples do this.CzmlDataSourceno longer sets the incorrect type of data intohierarchy, because we now need to handle holes.Fixes #3826
Sample CZML syntax for a constant set of holes.
Existing Sandcastle examples for CZML polygons now demonstrate holes using constant, intervals, and references.