水源地图标点击修改
parent
6c063b1163
commit
9c6a42531e
12
.env.dev
12
.env.dev
|
|
@ -1,14 +1,14 @@
|
|||
NODE_ENV = development
|
||||
|
||||
# 正式服务器
|
||||
#VUE_APP_BASE_API = http://221.2.83.254:9001/api
|
||||
#VUE_APP_BASE_IMG_URL = http://221.2.83.254:9001
|
||||
#VUE_APP_WEBSOCKET_URL = ws://221.2.83.254:9002/ws
|
||||
VUE_APP_BASE_API = http://221.2.83.254:9001/api
|
||||
VUE_APP_BASE_IMG_URL = http://221.2.83.254:9001
|
||||
VUE_APP_WEBSOCKET_URL = ws://221.2.83.254:9002/ws
|
||||
|
||||
# 本地测试
|
||||
VUE_APP_BASE_API = http://221.2.83.254:9013/api
|
||||
VUE_APP_BASE_IMG_URL = http://221.2.83.254:9013
|
||||
VUE_APP_WEBSOCKET_URL = ws://221.2.83.254:9002/ws
|
||||
# VUE_APP_BASE_API = http://221.2.83.254:9013/api
|
||||
# VUE_APP_BASE_IMG_URL = http://221.2.83.254:9013
|
||||
# VUE_APP_WEBSOCKET_URL = ws://221.2.83.254:9002/ws
|
||||
|
||||
# VUE_APP_BASE_API = http://192.168.10.114:81/api
|
||||
# VUE_APP_BASE_IMG_URL = http://192.168.10.114:81
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ export default {
|
|||
attribute.symbol.styleOptions.label.pixelOffsetY = -40
|
||||
}
|
||||
attribute.pid = group.id;
|
||||
// 替换所有图层地址路径
|
||||
// 替换所有图层地址路径 历史遗留数据库保存的是223服务器地址
|
||||
attribute.url = attribute.url.replace("http://223.99.16.253:9007","http://221.2.83.254:9007")
|
||||
// 去掉所有图层点击选中样式
|
||||
delete attribute.highlight;
|
||||
|
|
|
|||
|
|
@ -161,7 +161,9 @@ export default {
|
|||
},
|
||||
addGoodsLayer(){
|
||||
if (this.waterGraphicLayer == null) {
|
||||
this.waterGraphicLayer = new mars3d.layer.GraphicLayer();
|
||||
this.waterGraphicLayer = new mars3d.layer.GraphicLayer({
|
||||
zIndex:1
|
||||
});
|
||||
window.globalmap.addLayer(this.waterGraphicLayer);
|
||||
}
|
||||
|
||||
|
|
@ -172,6 +174,7 @@ export default {
|
|||
|
||||
this.nestWaterPoints.forEach((item, index) => {
|
||||
let graphic = new mars3d.graphic.BillboardEntity({
|
||||
id:index,
|
||||
position: [item.lngLat[0], item.lngLat[1]],
|
||||
style: {
|
||||
image: "img/water.png",
|
||||
|
|
@ -341,12 +344,75 @@ export default {
|
|||
},
|
||||
flyToPosition(item,index,type) {
|
||||
this.startLngLat = item.lngLat
|
||||
window.globalmap.flyToPoint([item.lngLat[0],item.lngLat[1]], { radius: 4000, pitch: -90 });
|
||||
window.globalmap.flyToPoint([item.lngLat[0],item.lngLat[1]], { radius: 800, pitch: -90 });
|
||||
this.flyAddPoint(item,index)
|
||||
},
|
||||
flyAddPoint(item,index){
|
||||
flyAddPoint(it,idx){
|
||||
let grap=this.waterGraphicLayer.getGraphicByAttr(idx,"id")
|
||||
|
||||
this.nestWaterPoints.forEach((item,index)=>{
|
||||
let obj = this.waterGraphicLayer.getGraphicByAttr(index,"id")
|
||||
obj.setStyle({
|
||||
image: "img/water.png",
|
||||
horizontalOrigin: Cesium.HorizontalOrigin.LEFT,
|
||||
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
|
||||
distanceDisplayCondition: new Cesium.DistanceDisplayCondition(
|
||||
0,
|
||||
200000
|
||||
), // 按视距距离显示
|
||||
scaleByDistance: new Cesium.NearFarScalar(1000, 1.0, 200000, 0.2),
|
||||
clampToGround: true,
|
||||
highlight: {
|
||||
type:'click',
|
||||
image: "img/wateractive.png",
|
||||
},
|
||||
label: {
|
||||
text:"水源地"+(index+1)+"("+item.distance+")km",
|
||||
font_size: 12,
|
||||
color: "#ffffff",
|
||||
pixelOffsetY: -78,
|
||||
pixelOffsetX:20,
|
||||
distanceDisplayCondition: true,
|
||||
distanceDisplayCondition_far: 6000,
|
||||
distanceDisplayCondition_near: 0,
|
||||
},
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
grap.setStyle(
|
||||
{
|
||||
image: "img/wateractive.png",
|
||||
horizontalOrigin: Cesium.HorizontalOrigin.LEFT,
|
||||
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
|
||||
distanceDisplayCondition: new Cesium.DistanceDisplayCondition(
|
||||
0,
|
||||
200000
|
||||
), // 按视距距离显示
|
||||
scaleByDistance: new Cesium.NearFarScalar(1000, 1.0, 200000, 0.2),
|
||||
clampToGround: true,
|
||||
highlight: {
|
||||
type:'click',
|
||||
image: "img/wateractive.png",
|
||||
},
|
||||
label: {
|
||||
text:"水源地"+(idx+1)+"("+it.distance+")km",
|
||||
font_size: 12,
|
||||
color: "#ffffff",
|
||||
pixelOffsetY: -78,
|
||||
pixelOffsetX:20,
|
||||
distanceDisplayCondition: true,
|
||||
distanceDisplayCondition_far: 6000,
|
||||
distanceDisplayCondition_near: 0,
|
||||
},
|
||||
})
|
||||
return;
|
||||
|
||||
console.log("grap",grap);
|
||||
if (this.waterGraphicLayerFly == null) {
|
||||
this.waterGraphicLayerFly = new mars3d.layer.GraphicLayer();
|
||||
this.waterGraphicLayerFly = new mars3d.layer.GraphicLayer({
|
||||
zIndex:99999999999999999999
|
||||
});
|
||||
window.globalmap.addLayer(this.waterGraphicLayerFly);
|
||||
}
|
||||
this.waterGraphicLayerArrFly.forEach((graphic) => {
|
||||
|
|
|
|||
|
|
@ -129,7 +129,6 @@ import md5 from 'js-md5'
|
|||
'tenantid'
|
||||
])
|
||||
},
|
||||
|
||||
methods: {
|
||||
...mapActions([
|
||||
'setTenantId', //
|
||||
|
|
@ -167,7 +166,6 @@ import md5 from 'js-md5'
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss">
|
||||
|
|
|
|||
Loading…
Reference in New Issue