outlineWidth on polygon doesn't have any effect?

If I set outlineWidth on a polygon I am not seeing the width change. Am I doing something wrong?


var orangePolygon = viewer.entities.add({
    name : 'Orange polygon with per-position heights and outline',
    polygon : {
        hierarchy : Cesium.Cartesian3.fromDegreesArrayHeights([-108.0, 25.0, 100000,
                                                               -100.0, 25.0, 100000,
                                                               -100.0, 30.0, 100000,
                                                               -108.0, 30.0, 300000]),
        extrudedHeight: 0,
        perPositionHeight : true,
        material : Cesium.Color.ORANGE.withAlpha(0.5),
        outline : true,
        outlineWidth: 5,
        outlineColor : Cesium.Color.RED

Sorry for the localhost link. Here is a real one:

Oops. I will answer my own question. I saw this in the Visualizing Spatial Data article

Unlike the fill property, outline does not have a corresponding material and instead relies on two separate outlineColor and outlineWidth properties. outlineWidth only works on non-Windows systems, such as Android, iOS, Linux, and OS X. On Windows systems, outlines will always have a width of 1. This is due to a limitation of how WebGL is implemented in all three major browser engines on Windows.

Thanks for posting your solution Ashley!

You’re right, line widths generally aren’t supported by WebGL on Windows. I think the workaround is to use polylines, which are essentially polygons so they can be as thick as needed. There’s some progress on that but there’s still some issues to be worked out, you can check that out here: