|
|
|
@ -88,9 +88,11 @@ export default { |
|
|
|
for (var item of res.rows) { |
|
|
|
this.publicToilet(item, [item.longitude, item.latitude]) |
|
|
|
} |
|
|
|
break |
|
|
|
break |
|
|
|
case '绿化': |
|
|
|
this.greening() |
|
|
|
for (var item of res.rows) { |
|
|
|
this.greening(item, item.coordinates) |
|
|
|
} |
|
|
|
break |
|
|
|
case '垃圾箱': |
|
|
|
for (var item of res.rows) { |
|
|
|
@ -103,9 +105,9 @@ export default { |
|
|
|
} |
|
|
|
break |
|
|
|
case '古树': |
|
|
|
for (var item of res.rows) { |
|
|
|
this.oldTrees(item, [item.longitude, item.latitude]) |
|
|
|
} |
|
|
|
for (var item of res.rows) { |
|
|
|
this.oldTrees(item, [item.longitude, item.latitude]) |
|
|
|
} |
|
|
|
break |
|
|
|
default: |
|
|
|
this.clean() |
|
|
|
@ -211,27 +213,11 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
// 绿化 |
|
|
|
greening() { |
|
|
|
greening(item,position) { |
|
|
|
console.log('经纬度',position); |
|
|
|
map.setCameraView({ lat: 38.824084, lng: 105.736887, alt: 994.9, heading: 351.4, pitch: -26.9 }) |
|
|
|
afforest = new mars3d.graphic.ScrollWall({ |
|
|
|
positions: [ |
|
|
|
[ |
|
|
|
105.736462, |
|
|
|
38.840078 |
|
|
|
], |
|
|
|
[ |
|
|
|
105.736533, |
|
|
|
38.839389 |
|
|
|
], |
|
|
|
[ |
|
|
|
105.737683, |
|
|
|
38.839479 |
|
|
|
], |
|
|
|
[ |
|
|
|
105.73757, |
|
|
|
38.840146 |
|
|
|
] |
|
|
|
], |
|
|
|
positions: position, |
|
|
|
style: { |
|
|
|
diffHeight: 30, // 高度 |
|
|
|
color: "#0BEDAA", |
|
|
|
@ -245,7 +231,14 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
attr: { remark: "示例1", xiaoguo: "鼠标移入时展示高亮效果" } |
|
|
|
attr: item, |
|
|
|
popup: `<div style="padding: 10px; color: #fff;"> |
|
|
|
<div style="border-bottom:1px solid #3D94E0;padding-bottom:5px; font-size: 16px; font-weight: bold; margin-bottom: 8px;">点位信息</div> |
|
|
|
<div style="line-height: 1.5;"> |
|
|
|
<div>类型:${item.type}</div> |
|
|
|
<div>位置:${item.name}</div> |
|
|
|
</div> |
|
|
|
</div>` |
|
|
|
}) |
|
|
|
graphicLayer.addGraphic(afforest) |
|
|
|
}, |
|
|
|
|