点标注更新高程时忽略自身
This commit is contained in:
@ -2391,7 +2391,7 @@ class BillboardObject extends Base {
|
||||
10000000000000
|
||||
)
|
||||
|
||||
let objectsToExclude = []
|
||||
let objectsToExclude = [this.entity]
|
||||
for (let [key, value] of this.sdk.entityMap) {
|
||||
if (value.type === 'RadarScanStereoscopic' && value.entity) {
|
||||
objectsToExclude.push(value.entity)
|
||||
|
||||
@ -96,17 +96,13 @@ class GeoJson extends Base {
|
||||
})
|
||||
let json = await rsp.json()
|
||||
this.geojson = json
|
||||
// this.sdk.addIncetance(this.options.id, this)
|
||||
return GeoJson.addDataToGlobe(this, json.features)
|
||||
}
|
||||
|
||||
/*geojosn暂时只用线的形式*/
|
||||
static addDataToGlobe(that) {
|
||||
/*geojosn暂时只用线的形式*/
|
||||
const geoJsonDataSource = new Cesium.GeoJsonDataSource();
|
||||
let geojson = that.deepCopyObj(that.geojson)
|
||||
let geojson = this.deepCopyObj(this.geojson)
|
||||
for (let i = 0; i < geojson.features.length; i++) {
|
||||
if (!geojson.features[i].id) {
|
||||
geojson.features[i].id = that.options.id + '_' + i
|
||||
geojson.features[i].id = this.options.id + '_' + i
|
||||
}
|
||||
}
|
||||
// console.log(geojson)
|
||||
@ -114,13 +110,13 @@ class GeoJson extends Base {
|
||||
clampToGround: true,
|
||||
});
|
||||
return promise.then(datasource => {
|
||||
that.entity = datasource
|
||||
this.entity = datasource
|
||||
datasource.entities.values.forEach(enetity => {
|
||||
// console.log(enetity)
|
||||
let color = Cesium.Color.fromCssColorString(that.options.color)
|
||||
let color = Cesium.Color.fromCssColorString(this.options.color)
|
||||
let colorPolygon = color.withAlpha(0.2)
|
||||
enetity.show = that.options.show
|
||||
that.sdk.viewer.entities.add(enetity)
|
||||
enetity.show = this.options.show
|
||||
this.sdk.viewer.entities.add(enetity)
|
||||
if (enetity.billboard) {
|
||||
enetity.billboard.heightReference = Cesium.HeightReference.CLAMP_TO_GROUND
|
||||
enetity.point = new Cesium.PointGraphics({
|
||||
@ -134,26 +130,26 @@ class GeoJson extends Base {
|
||||
|
||||
if (enetity.polyline) {
|
||||
enetity.polyline.material = color
|
||||
enetity.polyline.zIndex = that.sdk._entityZIndex
|
||||
that.sdk._entityZIndex++
|
||||
enetity.polyline.zIndex = this.sdk._entityZIndex
|
||||
this.sdk._entityZIndex++
|
||||
}
|
||||
|
||||
if (enetity.polygon) {
|
||||
enetity.polygon.perPositionHeight = false
|
||||
enetity.polygon.material = colorPolygon
|
||||
enetity.polygon.zIndex = that.sdk._entityZIndex
|
||||
enetity.polygon.zIndex = this.sdk._entityZIndex
|
||||
|
||||
enetity.polyline = new Cesium.PolylineGraphics({
|
||||
positions: enetity.polygon.hierarchy._value.positions,
|
||||
width: 1,
|
||||
clampToGround: true,
|
||||
material: color,
|
||||
zIndex: that.sdk._entityZIndex
|
||||
zIndex: this.sdk._entityZIndex
|
||||
})
|
||||
that.sdk._entityZIndex++
|
||||
this.sdk._entityZIndex++
|
||||
}
|
||||
})
|
||||
that.loading = false
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user