I use GeoJsonDataSource to load some polygon and i want to set a outlineWidth of every polygon,but the outlineWidth property of PolygonGraphics is useless,whatever the width set,it shows the same width
Cesium.GeoJsonDataSource.load('./data/data.json').then(dataSource => {
viewer.dataSources.add(dataSource);
var entities = dataSource.entities.values;
entities.forEach(function(entity,index){
entity.polygon.fill = Cesium.Color.WHITE.withAlpha(0.0001);
entity.polygon.outline = true;
entity.polygon.outlineColor = Cesium.Color.YELLOW;
entity.polygon.outlineWidth = 50;
});
});
anneg
January 18, 2024, 9:11am
2
Are you working on Windows? It seems Windows is the limitation, see:
opened 03:13PM - 22 Aug 16 UTC
closed 03:26PM - 22 Aug 16 UTC
While running this code:
```
Cesium.Math.setRandomNumberSeed(1234);
var viewer… = new Cesium.Viewer('cesiumContainer', { infoBox : false });
var entities = viewer.entities;
var positions = Cesium.Cartesian3.fromDegreesArray([
-107.0, 31.0,
-107.0, 39.0,
-97.0, 39.0,
-97.0, 31.0
]);
entities.add({
polygon : {
height: 0,
hierarchy : new Cesium.PolygonHierarchy(positions),
material : Cesium.Color.BLUE,
outline: true,
outlineColor: Cesium.Color.RED,
outlineWidth: 50
}
});
viewer.zoomTo(viewer.entities);
```
Note the outlineWidth set to 50, which should draw a fairly thick outline.
But the outline is fairly thin, and doesn't change if you modify the value to something else, say 1, or 200.
![image](https://cloud.githubusercontent.com/assets/1951843/17859860/e8aa7f1a-6850-11e6-912d-da4612d73916.png)