|
@@ -334,6 +334,7 @@ export default {
|
|
|
viewer.dataSources.add(data);
|
|
|
let entities = data.entities.values;
|
|
|
// let addlabel = false;
|
|
|
+ console.log(geojson, "geojson");
|
|
|
if (!geojson.type.includes("Polygon") || height) {
|
|
|
entities.forEach((entity, ei) => {
|
|
|
if (entity.billboard) {
|
|
@@ -350,7 +351,7 @@ export default {
|
|
|
entity.polygon.outlineWidth = 1.0;
|
|
|
// if (!addlabel) {
|
|
|
let center = this.getCentroid(geojson, ei).geometry.coordinates;
|
|
|
- console.log(center, "geojson");
|
|
|
+
|
|
|
var polycenter = Cesium.Cartesian3.fromDegrees(
|
|
|
center[0],
|
|
|
center[1],
|
|
@@ -383,7 +384,6 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
getCentroid(geojson, eindex) {
|
|
|
- console.log(geojson, "jj");
|
|
|
if (turf.getType(geojson) === "Feature") {
|
|
|
geojson = geojson.geometry;
|
|
|
}
|