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

Polylines normal to the earth's surface disappear in 2D #94

Open
mramato opened this issue Jul 3, 2012 · 6 comments
Open

Polylines normal to the earth's surface disappear in 2D #94

mramato opened this issue Jul 3, 2012 · 6 comments

Comments

@mramato
Copy link
Contributor

mramato commented Jul 3, 2012

It's pretty simple, if a line is normal to the earth, it disappears in 2D. Ideally, we would use the width and outline of the line to turn it into a point in 2D mode. We have some code in DynamicScene that creates points on the fly using billboards, we might be able to adapt/refactor that out for this use case as well. I have an example CZML that shows the issue if anyone wants to look at this.

@pjcozzi
Copy link
Contributor

pjcozzi commented Jul 3, 2012

We probably want to fix this in the polyline; otherwise people using the API directly will need the same logic. It should be pretty straightforward.

@mramato
Copy link
Contributor Author

mramato commented Jul 3, 2012

I agree, I was just pointing out we had code that generated outlined points of arbitrary size. I definitely think it needs to be handled at the Polyline layer.

@mramato
Copy link
Contributor Author

mramato commented Apr 25, 2014

This also happens with WallGeometry

@pjcozzi pjcozzi self-assigned this Oct 6, 2014
@hpinkos
Copy link
Contributor

hpinkos commented Dec 7, 2016

Code example:

var viewer = new Cesium.Viewer('cesiumContainer', {
    sceneMode: Cesium.SceneMode.SCENE2D
});

viewer.entities.add({
    polyline : {
        positions : Cesium.Cartesian3.fromDegreesArrayHeights([-75, 35, 0,
                                                        -75, 35, 1000000]),
        width : 5,
        material : Cesium.Color.RED
    }
});

viewer.entities.add({
    wall : {
        positions : Cesium.Cartesian3.fromDegreesArrayHeights([-115.0, 44.0, 200000.0,
                                                               -90.0, 44.0, 200000.0]),
        minimumHeights : [100000.0, 100000.0],
        material : Cesium.Color.RED
    }
});

@mramato
Copy link
Contributor Author

mramato commented Jan 25, 2017

Also reported on the forum: https://groups.google.com/d/msg/cesium-dev/ZGV9jpxMSIE/9L_MW_ZGAQAJ

For walls, I think we can get to good enough at the KML level by always adding an outline to walls of the same color as the geometry (unless the wall itself specifies a different color in the KML). It should just be a small change in KmlDataSource.js (and the tests).

@pjcozzi
Copy link
Contributor

pjcozzi commented Feb 13, 2017

KML fix: #4961

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants