Skip to content
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

Wrong type in Entity corridor #453

Closed
IvanLudvig opened this issue Dec 5, 2020 · 2 comments
Closed

Wrong type in Entity corridor #453

IvanLudvig opened this issue Dec 5, 2020 · 2 comments
Labels

Comments

@IvanLudvig
Copy link

There's a type error when creating an Entity with a corridor. Creating an Entity like this (from a Cesium sandcastle demo).

<Entity
    position={Cartesian3.fromDegrees(20, 20)}
    corridor={{
        positions: Cartesian3.fromDegreesArray([
            -100.0, 40.0,
            -105.0, 40.0,
            -105.0, 35.0,
        ]),
        width: 200000.0,
        material: Color.RED.withAlpha(0.5)
    }}
/>

This gives the following error for the positions property: Type 'Cartesian3[]' is not assignable to type 'Cartesian3 | Property | undefined'. Clearly, the positions field should accept an array of positions(Cartesian3[]).

@rot1024
Copy link
Member

rot1024 commented Dec 11, 2020

Thank you for reporting. I will check it soon!

@rot1024 rot1024 added the bug label Dec 11, 2020
@rot1024
Copy link
Member

rot1024 commented Sep 9, 2021

https://github.com/CesiumGS/cesium/blob/main/Source/DataSources/CorridorGraphics.js#L14

This bug is caused by Cesium, because Resium just refers to type definitions of Cesium. It would be great to open a issue or send a pull request to Cesium.

@rot1024 rot1024 closed this as completed Sep 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants