|
|
@@ -48,13 +48,13 @@ export default {
|
|
|
addInitialPoints() {
|
|
|
graphicsLayer = new this.mars3d.layer.GraphicLayer()
|
|
|
window.map.addLayer(graphicsLayer)
|
|
|
- this.inspectionOptions.forEach((point) => {
|
|
|
- this.addPointToMap(point)
|
|
|
+ this.inspectionOptions.forEach((point, index) => {
|
|
|
+ this.addPointToMap(point, index)
|
|
|
})
|
|
|
},
|
|
|
|
|
|
// 添加点到地图
|
|
|
- addPointToMap(point) {
|
|
|
+ addPointToMap(point, index) {
|
|
|
const graphic = new this.mars3d.graphic.BillboardEntity({
|
|
|
position: [point.longitude, point.latitude],
|
|
|
style: {
|
|
|
@@ -65,6 +65,23 @@ export default {
|
|
|
},
|
|
|
attr: { ...point }
|
|
|
})
|
|
|
+ //添加可视化区域
|
|
|
+ const sector = new this.mars3d.graphic.CircleEntity({
|
|
|
+ id: 'sector_' + index,
|
|
|
+ positions: [[point.longitude, point.latitude, 0]],
|
|
|
+ style: {
|
|
|
+ radius: 6000,
|
|
|
+ color: '#32edda',
|
|
|
+ opacity: 0.35,
|
|
|
+ outline: true,
|
|
|
+ outlineWidth: 1,
|
|
|
+ outlineColor: '#32edda',
|
|
|
+ visibleDepth: false,
|
|
|
+ clampToGround: true
|
|
|
+ },
|
|
|
+ attr: { ...point }
|
|
|
+ })
|
|
|
+ graphicsLayer.addGraphic(sector)
|
|
|
graphicsLayer.addGraphic(graphic)
|
|
|
let that = this
|
|
|
graphic.on(this.mars3d.EventType.click, function () {
|