测试热力图
parent
df1b6fc90e
commit
7eeb850682
|
|
@ -30,6 +30,7 @@
|
|||
<script type="text/javascript" src="%PUBLIC_URL%/imouplayer.js"></script>
|
||||
<script src="%PUBLIC_URL%/h5Player/h5player.min.js"></script>
|
||||
<title>檀树岗水库现代化运行管理矩阵平台</title>
|
||||
<!-- <div class="mytest"></div> -->
|
||||
|
||||
<style>
|
||||
.lf{
|
||||
|
|
@ -43,6 +44,17 @@
|
|||
display:block;
|
||||
clear:both;
|
||||
}
|
||||
.mytest{
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
/* border: 1px solid red; */
|
||||
background-color: red;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-100%, -100%);
|
||||
z-index: 999999;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
|
|
|
|||
|
|
@ -324,6 +324,7 @@ export async function loadMenu(): Promise<MenuItem[]> {
|
|||
{ id: id(), title: '参数管理', path: '/mgr/sy/hsyb/csgl' },
|
||||
]
|
||||
},
|
||||
{ id: id(), title: '洪水预演', path: '/mgr/sy/hsyy' },
|
||||
{ id: id(), title: '防汛预案', path: '/mgr/sy/fxya' },
|
||||
{ id: id(), title: '调度规程', path: '/mgr/sy/ddgc' },
|
||||
{
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@ module.exports = function (app) {
|
|||
app.use(
|
||||
'/gunshiApp',
|
||||
createProxyMiddleware({
|
||||
target: 'http://local.gunshiiot.com:18083/',//测试
|
||||
// target: 'http://local.gunshiiot.com:18083/',//测试
|
||||
target: 'http://223.75.53.141:83/',//测试
|
||||
// target: 'http://192.168.66.199:24105/',//正式
|
||||
// target: 'http://36.139.207.50:18083/',//移动云
|
||||
// target: 'http://192.168.66.49:24105/',//移动云
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ export default class Map3D extends BaseMap {
|
|||
this.layerMgr = null;
|
||||
this.toolMgr = null;
|
||||
this.demo = null;
|
||||
this.list = []
|
||||
|
||||
// @ts-ignore
|
||||
const open = XMLHttpRequest.prototype.open;
|
||||
|
|
@ -98,6 +99,7 @@ export default class Map3D extends BaseMap {
|
|||
// requestVertexNormals: true,
|
||||
// }),
|
||||
|
||||
shouldAnimate: true, //动画
|
||||
scene3DOnly: true,//用于强制场景以 3D 模式运行,禁止切换至 2D 或 Columbus 视图
|
||||
animation: false,//获取动画小部件。
|
||||
baseLayerPicker: false,//获取BaseLayerPicker。
|
||||
|
|
@ -230,16 +232,17 @@ export default class Map3D extends BaseMap {
|
|||
let height = Math.ceil(viewer.camera.positionCartographic.height);
|
||||
let zoom = heightToZoom(height);
|
||||
|
||||
console.log('地图变化监听事件',zoom);
|
||||
// console.log('地图变化监听事件',zoom);
|
||||
|
||||
});
|
||||
|
||||
this.layerMgr = new LayerMgr3D(viewer);
|
||||
this.demo = new Demo3D()
|
||||
|
||||
this.demo.getQxsy(viewer) //倾斜摄影
|
||||
this.demo.getDem(viewer) //地形图
|
||||
// this.demo.getQxsy(viewer) //倾斜摄影
|
||||
// this.demo.getDem(viewer) //地形图
|
||||
this.demo.getWxyx(viewer) //卫星影像
|
||||
this.demo.getCzml2(viewer) //demo
|
||||
// this.demo.getGltf(viewer) //模型
|
||||
// this.demo.getWater(viewer)//简单淹没分析
|
||||
// this.demo.getWater2(viewer)
|
||||
|
|
@ -260,8 +263,11 @@ export default class Map3D extends BaseMap {
|
|||
// destination: Cesium.Cartesian3.fromDegrees(...config.homeCenter3D),
|
||||
destination: Cesium.Cartesian3.fromDegrees(114.763746000,31.482518000,1000),
|
||||
orientation: {
|
||||
// heading: Cesium.Math.toRadians(0),
|
||||
// pitch: Cesium.Math.toRadians(-35.0),
|
||||
// roll: 0.0
|
||||
heading: Cesium.Math.toRadians(0),
|
||||
pitch: Cesium.Math.toRadians(-35.0),
|
||||
pitch: Cesium.Math.toRadians(-90.0),
|
||||
roll: 0.0
|
||||
}
|
||||
});
|
||||
|
|
@ -286,6 +292,27 @@ export default class Map3D extends BaseMap {
|
|||
}
|
||||
});
|
||||
|
||||
// 假设你已经有了一个Viewer实例,名为viewer
|
||||
var handler = new Cesium.ScreenSpaceEventHandler(viewer.scene.canvas);
|
||||
handler.setInputAction(function(click) {
|
||||
// 在这里处理点击事件
|
||||
var cartesian = viewer.camera.pickEllipsoid(click.position, viewer.scene.globe.ellipsoid);
|
||||
if (cartesian) {
|
||||
var cartographic = Cesium.Cartographic.fromCartesian(cartesian);
|
||||
var longitudeString = Cesium.Math.toDegrees(cartographic.longitude).toFixed(12);
|
||||
var latitudeString = Cesium.Math.toDegrees(cartographic.latitude).toFixed(12);
|
||||
// console.log(longitudeString+','+latitudeString+','+0+',');
|
||||
let list = sessionStorage.getItem('myList')||''
|
||||
list = list + longitudeString+','+latitudeString+','+0+','
|
||||
sessionStorage.setItem('myList',list)
|
||||
|
||||
// 你可以在这里添加更多的逻辑,比如创建一个标记或者显示信息等
|
||||
} else {
|
||||
console.log('点击位置不在地面上');
|
||||
}
|
||||
}, Cesium.ScreenSpaceEventType.LEFT_CLICK); // 或者使用其他类型的点击事件,如RIGHT_CLICK等
|
||||
|
||||
|
||||
this._map = viewer;
|
||||
const toremove = document.getElementsByClassName('cesium-widget-credits');
|
||||
if (toremove && toremove[0]) {
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue