|
@@ -73,8 +73,10 @@ export default {
|
|
|
},
|
|
|
//移除之前添加的点
|
|
|
clearMRadius() {
|
|
|
- if (this.markerboxEntityRadius != null) {
|
|
|
- this.viewer.entities.remove(this.markerboxEntityRadius)
|
|
|
+ if (this.markerboxEntityRadius != null && this.markerboxEntityRadius.length>0) {
|
|
|
+ for (let i = 0; i < this.markerboxEntityRadius.length; i++) {
|
|
|
+ this.viewer.entities.remove(this.markerboxEntityRadius[i])
|
|
|
+ }
|
|
|
this.markerboxEntityRadius = []
|
|
|
}
|
|
|
},
|
|
@@ -147,8 +149,10 @@ export default {
|
|
|
},
|
|
|
//移除之前添加的点
|
|
|
clearM() {
|
|
|
- if (this.markerboxEntity != null) {
|
|
|
- this.viewer.entities.remove(this.markerboxEntity)
|
|
|
+ if (this.markerboxEntity != null && this.markerboxEntity.length>0) {
|
|
|
+ for (let i = 0; i < this.markerboxEntity.length; i++) {
|
|
|
+ this.viewer.entities.remove(this.markerboxEntity[i])
|
|
|
+ }
|
|
|
this.markerboxEntity = []
|
|
|
}
|
|
|
},
|