|
@@ -279,10 +279,22 @@ export default {
|
|
|
stroke: Cesium.Color.fromCssColorString(yanse),
|
|
|
fill: fcolor.withAlpha(0.4), //注意:颜色必须大写,即不能为blue
|
|
|
strokeWidth: 5,
|
|
|
+ // markerSymbol: "", //点图钉的默认符号
|
|
|
})
|
|
|
.then((data) => {
|
|
|
viewer.dataSources.add(data);
|
|
|
- // let entities = data.entities.values;
|
|
|
+ let entities = data.entities.values;
|
|
|
+ if (!geojson.type.includes("Polygon")) {
|
|
|
+ entities.forEach((value) => {
|
|
|
+ if (value.billboard) {
|
|
|
+ value.billboard = undefined;
|
|
|
+ value.point = {
|
|
|
+ pixelsize: 20,
|
|
|
+ color: Cesium.Color.fromCssColorString(yanse),
|
|
|
+ };
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
viewer.flyTo(data, {
|
|
|
offset: new Cesium.HeadingPitchRange(0, -45, 5000),
|
|
|
});
|