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

Segment display is not connected #3293

Closed
bicealyh opened this issue Dec 5, 2015 · 3 comments
Closed

Segment display is not connected #3293

bicealyh opened this issue Dec 5, 2015 · 3 comments

Comments

@bicealyh
Copy link

bicealyh commented Dec 5, 2015

I use the following method to draw polyline volume,but find the segment display is not connected,Why?

   function computeCircle(radius) {
            var positions = [];
            for (var i = 0; i < 360; i++) {
                    var radians = BeyonMap.Math.toRadians(i);
                    positions.push(new BeyonMap.Cartesian2(radius * Math.cos(radians), radius *  Math.sin(radians)));
            }
            return positions;
    }

    var promiseRoad =BeyonMap.GeoJsonDataSource.load('./Test.geojson');
    promiseRoad.then(function(dataSource) {
            var entities = dataSource.entities.values;
            var nowtime = BeyonMap.JulianDate.now();
            for (var i = 0; i < entities.length; i++) {
                    var entity = entities[i];
                    var redLine = viewer.entities.add({
                            polylineVolume : {
                                    positions : entity.polyline.positions.getValue(nowtime),
                                    shape : computeCircle(5.0),
                                    outline : false,
                                    material : BeyonMap.Color.WHITE
                            }
                    });
            }
    }).otherwise(function(error){
            //Display any errrors encountered while loading.
            window.alert(error);
    });
@bicealyh
Copy link
Author

bicealyh commented Dec 5, 2015

test

Test.txt

@hpinkos
Copy link
Contributor

hpinkos commented Dec 9, 2015

@bicealyh I submitted a fix here #3305

This will fill in many of the gaps, but there are still some breaks because you data is a bunch of separate polylines. You'll have to combine positions that are supposed to be connected into a single polyline in order for the PolylineVolume to fill in the rest of the gaps and corners.

@hpinkos
Copy link
Contributor

hpinkos commented Dec 10, 2015

@bicealyh This was fixed in #3305. It will be included in the next release (Cesium 1.17)

@hpinkos hpinkos closed this as completed Dec 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants