Commit 8c9cb598 authored by caicaicai's avatar caicaicai

修改

parent ac089eb9
......@@ -39,9 +39,10 @@
<span class="el-icon-location"></span>
</div> -->
<!-- 地图区域 -->
<div id="centerDiv" class="mapcontainer1">
<!-- <div id="centerDiv" class="mapcontainer1">
<mars3dViewerMap :url="configUrl" @onload="onMapload"/>
</div>
</div> -->
<iframe src="http://8.143.203.103:9092/#/Index" frameborder="0" class="mapcontainer1"></iframe>
</div>
</template>
......@@ -52,7 +53,7 @@ import carManagement from './components/carManagement/index.vue' //车辆管理
import intelligentSchedul from './components/intelligentSchedul/index.vue' //智能调度
import dataAnalysis from './components/dataAnalysis/index.vue' //数据分析
import carSpecificInfor from './components/carSpecificInfor/index.vue' //车辆信息弹框
import mars3dViewerMap from '../../components/mars3d/Map.vue' //地图
// import mars3dViewerMap from '../../components/mars3d/Map.vue' //地图
import carsEZUIKitJs from '../../components/ezuikit/carsEZUIKitJs.vue'//车辆监控
import kaungEZUIKitJs from '../../components/ezuikit/EZUIKitJs.vue'//矿山监控
......@@ -63,7 +64,7 @@ export default {
intelligentSchedul,
dataAnalysis,
carSpecificInfor,
mars3dViewerMap,
//mars3dViewerMap,
carsEZUIKitJs,
kaungEZUIKitJs,
},
......@@ -277,41 +278,41 @@ export default {
this.currentTime = yy + '/' + mm + '/' + dd + ' ' + hou + ':' + min;
},
// 地图构造完成回调
onMapload(map) {
// 以下为演示代码
// onMapload(map) {
// // 以下为演示代码
// 创建entity图层
const graphicLayer = new this.mars3d.layer.GraphicLayer()
map.addLayer(graphicLayer)
// // 创建entity图层
// const graphicLayer = new this.mars3d.layer.GraphicLayer()
// map.addLayer(graphicLayer)
// 2.在layer上绑定监听事件
graphicLayer.on(this.mars3d.EventType.click, function (event) {
console.log('监听layer,单击了矢量对象', event)
})
graphicLayer.on(this.mars3d.EventType.mouseOver, function (event) {
console.log('监听layer,鼠标移入了矢量对象', event)
})
graphicLayer.on(this.mars3d.EventType.mouseOut, function (event) {
console.log('监听layer,鼠标移出了矢量对象', event)
})
// 可在图层上绑定popup,对所有加到这个图层的矢量数据都生效
graphicLayer.bindPopup('我是layer上绑定的Popup', {
anchor: [0, -10]
})
// 可在图层绑定右键菜单,对所有加到这个图层的矢量数据都生效
graphicLayer.bindContextMenu([
{
text: '删除对象',
iconCls: 'fa fa-trash-o',
callback: function (e) {
const graphic = e.graphic
if (graphic) {
graphicLayer.removeGraphic(graphic)
}
}
}
])
},
// // 2.在layer上绑定监听事件
// graphicLayer.on(this.mars3d.EventType.click, function (event) {
// console.log('监听layer,单击了矢量对象', event)
// })
// graphicLayer.on(this.mars3d.EventType.mouseOver, function (event) {
// console.log('监听layer,鼠标移入了矢量对象', event)
// })
// graphicLayer.on(this.mars3d.EventType.mouseOut, function (event) {
// console.log('监听layer,鼠标移出了矢量对象', event)
// })
// // 可在图层上绑定popup,对所有加到这个图层的矢量数据都生效
// graphicLayer.bindPopup('我是layer上绑定的Popup', {
// anchor: [0, -10]
// })
// // 可在图层绑定右键菜单,对所有加到这个图层的矢量数据都生效
// graphicLayer.bindContextMenu([
// {
// text: '删除对象',
// iconCls: 'fa fa-trash-o',
// callback: function (e) {
// const graphic = e.graphic
// if (graphic) {
// graphicLayer.removeGraphic(graphic)
// }
// }
// }
// ])
// },
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment