StrokeWidth and Polygons

Can you control the width of the polygon border through the datasource.load() call. It seems that I cannot change the width of the borders.

My layers are Multipolygon geometry. I have the following code snippet that is reused for different shapes

dataSource.load(jsonData,{

markerSize: markerSize,

markerSymbol: markerSymbol,

markerColor: markerColor,

stroke: stroke_color,

strokeWidth: 8.0,

fill: fill

});

All the options loaded are variables except for strokeWidth which I hard-coded to test. I get nice fat lines for MultiLineStrings but only the default 1 pixel width for polygon borders.

I can change the strokeColor no problem, just not the width.

Thanks

Joe

Assuming you are on Windows, this is a limitation in how Chrome/Firefox/IE implement WebGL on Windows. It works everywhere else. See here for details: http://stackoverflow.com/a/25405483/3191039

The reason this works for polylines and not outlines is because we use a very different (and much more complicated) rendering path for them: http://cesiumjs.org/2013/04/22/Robust-Polyline-Rendering-with-WebGL/

We’ve talked about trying to have outlines use the polyline shaders; but due to the nature of how outlines are connected (multiple segments such as the corner of a box), the result would probably not look very good. We may eventually revisit the problem; but it’s not on the near term roadmap.

Thanks Matt
Yes I am on Windows. Does it render differently on the Mac? I guess I may just look to use darker outlines instead of thickness but you bring up a good point! I’ll need to see how this looks from different client platforms. Since I’m serving the styling information on the server I can probably just add different setting for Windows and them modify the code to render differently based on platform.

Joe