I’m getting a line width of 1 pixel each time for polygons despite setting different line widths in the KML:
#FF000000normal3
I’m displaying as follows:
var kmlDocument = new DOMParser().parseFromString(kmlString, “application/xml”);
viewer.dataSources.add(Cesium.KmlDataSource.load(kmlDocument));
How is Cesium interpreting the KML for the polygon outline?
Are you on Windows? If so the answer is that your browser is artificially limiting the width of geometry outlines to 1. Line width will work on non-windows systems like Android, Linux, and Mac. I wrote up a fairly comprehensive answer to this question a while ago on Stack Overflow, here’s the link: http://stackoverflow.com/a/25405483/3191039
If you aren’t on Windows, then this may be a bug.
I’m using Firefox on windows 7. I’ve noticed the problem also using the same KML file in Cesium Viewer on IE and on Chrome. The problem is with polygons only. I have no trouble rendering thick polylines (LineString).
Yes, this applies to polygons and other shape/volume geometry only. Polylines go through a very different (and complicated) rendering path. So the behavior you are seeing is a limitation of browsers on Windows, and not Cesium.
As a work around for drawing polygons with wider line widths I am draw a regular polyline with the desired thickness in addition to the polygon.
Where things get a little tricky is with polygons on the ground with terrain. To get the lines to follow the terrain one needs to sample the terrain and break each line segment into subsegments with the sampled elevation
Berwyn, polygon on terrain is now supported by Cesium.