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

Polyline dashes don't play nice with CallbackProperty #5450

Closed
emackey opened this issue Jun 9, 2017 · 1 comment
Closed

Polyline dashes don't play nice with CallbackProperty #5450

emackey opened this issue Jun 9, 2017 · 1 comment

Comments

@emackey
Copy link
Contributor

emackey commented Jun 9, 2017

When using CallbackProperty, the polyline dashes are always shown horizontally, even if the line is mostly vertical in screen space.

Here's a demo. Try moving the camera around to see how the dashes behave at different orientations. The light blue line behaves the usual way, with the dashes facing the most prominent direction of the line. But the yellow line always cuts the dashes horizontally, regardless of the screen-space direction of the line.

/cc @AnneWoepse

var viewer = new Cesium.Viewer('cesiumContainer');

var redLine = viewer.entities.add({
    name : 'Yellow dashed line',
    polyline : {
        positions : new Cesium.CallbackProperty(() => {
        return Cesium.Cartesian3.fromDegreesArrayHeights([-95, 50, 250000,
                                                        -95, 30, 250000]);
        }, false),
        width : 8,
        material : new Cesium.PolylineDashMaterialProperty({
            color: Cesium.Color.YELLOW
        })
    }
});

var blueLine = viewer.entities.add({
    name : 'Blue dashed line',
    polyline : {
        positions : Cesium.Cartesian3.fromDegreesArrayHeights([-98, 50, 250000,
                                                        -98, 30, 250000]),
        width : 8,
        material : new Cesium.PolylineDashMaterialProperty({
            color: Cesium.Color.LIGHTSKYBLUE
        })
    }
});


viewer.zoomTo(viewer.entities);

polylinedashproblem2

@hpinkos
Copy link
Contributor

hpinkos commented Sep 19, 2019

Could no longer reproduce

@hpinkos hpinkos closed this as completed Sep 19, 2019
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

3 participants