智慧工地修改
This commit is contained in:
parent
d347e62b32
commit
efc3b24dd4
|
@ -1,6 +1,7 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en-us">
|
<html lang="en-us">
|
||||||
<head>
|
|
||||||
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||||
<title>省公司</title>
|
<title>省公司</title>
|
||||||
|
@ -9,38 +10,39 @@
|
||||||
<script src="TemplateData/UnityProgress.js"></script>
|
<script src="TemplateData/UnityProgress.js"></script>
|
||||||
<script src="Build/UnityLoader.js"></script>
|
<script src="Build/UnityLoader.js"></script>
|
||||||
<script>
|
<script>
|
||||||
var unityInstance = UnityLoader.instantiate("unityContainer", "Build/sgs.json", {onProgress: UnityProgress});
|
var unityInstance = UnityLoader.instantiate("unityContainer", "Build/sgs.json", { onProgress: UnityProgress });
|
||||||
|
|
||||||
//开启/关闭楼层面板 arg:true|false
|
//开启/关闭楼层面板 arg:true|false
|
||||||
window.parent.FloorUI = function(arg){
|
window.parent.FloorUI = function (arg) {
|
||||||
console.log("arg11111",arg)
|
console.log("arg11111", arg)
|
||||||
unityInstance.SendMessage("GameManager","FloorUI",arg);
|
unityInstance.SendMessage("GameManager", "FloorUI", arg);
|
||||||
}
|
}
|
||||||
//调用停车场
|
//调用停车场
|
||||||
window.parent.FloorBase = function(arg){
|
window.parent.FloorBase = function (arg) {
|
||||||
console.log("arg",arg)
|
console.log("arg", arg)
|
||||||
unityInstance.SendMessage("GameManager","FloorBase",'true');
|
unityInstance.SendMessage("GameManager", "FloorBase", 'true');
|
||||||
}
|
}
|
||||||
//跳转场景 GongDi MainScene B1 B2 B3 1 2 4 27
|
//跳转场景 GongDi MainScene B1 B2 B3 1 2 4 27
|
||||||
window.parent.GotoScene = function (arg){
|
window.parent.GotoScene = function (arg) {
|
||||||
unityInstance.SendMessage("GameManager","GotoScene",arg);
|
unityInstance.SendMessage("GameManager", "GotoScene", arg);
|
||||||
}
|
}
|
||||||
//取消场景
|
//取消场景
|
||||||
window.parent.cancel = function () {
|
window.parent.cancel = function () {
|
||||||
unityInstance.SendMessage("GameManager","GotoScene","MainScene");
|
unityInstance.SendMessage("GameManager", "GotoScene", "MainScene");
|
||||||
}
|
}
|
||||||
//当场景加载完成的时候
|
//当场景加载完成的时候
|
||||||
function OnSceneLoaded(scene){
|
function OnSceneLoaded(scene) {
|
||||||
window.parent.OnSceneLoaded(scene)
|
window.parent.OnSceneLoaded(scene)
|
||||||
}
|
}
|
||||||
//打开全景图
|
//打开全景图
|
||||||
function getUrl(url){
|
function getUrl(url) {
|
||||||
console.log("打开全景",url);
|
console.log("打开全景", url);
|
||||||
window.parent.postMessage({ status:'200',data:"360全景",panorama:url},'*');
|
window.parent.postMessage({ status: '200', data: "360全景", panorama: url }, '*');
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
|
||||||
|
<body>
|
||||||
<div class="webgl-content" style="width:100%;height: 100%;">
|
<div class="webgl-content" style="width:100%;height: 100%;">
|
||||||
<div id="unityContainer"></div>
|
<div id="unityContainer"></div>
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
|
@ -49,5 +51,6 @@
|
||||||
<div class="title">ShengDaPing</div>
|
<div class="title">ShengDaPing</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
|
@ -39,7 +39,7 @@
|
||||||
// "pk": { name: "浦口区", lng: 118.592631, lat: 32.049500, markers: [{ icon: "images/marker.png", width: 128, height: 128, lng: 118.589631, lat: 32.049500, data: "12345" }, { icon: "images/marker.png", width: 32, height: 32, lng: 118.592832, lat: 32.059502, data: "12345" }] },
|
// "pk": { name: "浦口区", lng: 118.592631, lat: 32.049500, markers: [{ icon: "images/marker.png", width: 128, height: 128, lng: 118.589631, lat: 32.049500, data: "12345" }, { icon: "images/marker.png", width: 32, height: 32, lng: 118.592832, lat: 32.059502, data: "12345" }] },
|
||||||
// "nj": { "lng": 118.77455, "lat": 32.060982, markers: [{ icon: "images/byyyxq.png",w:300,h:200, lng: 118.77256, lat:32.060982, data: "北阴阳营小区" },{ icon: "images/sads.png",w:300,h:200, lng: 118.77327, lat: 32.05902, data: "苏安大厦" }] },
|
// "nj": { "lng": 118.77455, "lat": 32.060982, markers: [{ icon: "images/byyyxq.png",w:300,h:200, lng: 118.77256, lat:32.060982, data: "北阴阳营小区" },{ icon: "images/sads.png",w:300,h:200, lng: 118.77327, lat: 32.05902, data: "苏安大厦" }] },
|
||||||
// "nj": { "lng": 118.77455, "lat": 32.060982, markers: [{ icon: "images/byyyxq.png",lng: 118.77256, lat:32.060982, data: "北阴阳营小区" },{ icon: "images/sads.png", lng: 118.77327, lat: 32.05902, data: "苏安大厦" }] },
|
// "nj": { "lng": 118.77455, "lat": 32.060982, markers: [{ icon: "images/byyyxq.png",lng: 118.77256, lat:32.060982, data: "北阴阳营小区" },{ icon: "images/sads.png", lng: 118.77327, lat: 32.05902, data: "苏安大厦" }] },
|
||||||
"nj": { "lng": 118.77455, "lat": 32.060982, markers: [{ icon: "images/byyyxq.png",lng: 118.77256, lat:32.060982, data: "北阴阳营小区" }] },
|
"nj": { "lng": 118.77455, "lat": 32.060982, markers: [{ icon: "images/byyyxq.png", lng: 118.77256, lat: 32.060982, data: "北阴阳营小区", wisUrl: "/sgs/index.html" }] },
|
||||||
"jy": { name: "建邺区", lng: 118.729156, lat: 32.005818 },
|
"jy": { name: "建邺区", lng: 118.729156, lat: 32.005818 },
|
||||||
"gl": { name: "鼓楼区", lng: 118.774862, lat: 32.086006 },
|
"gl": { name: "鼓楼区", lng: 118.774862, lat: 32.086006 },
|
||||||
"yh": { name: "雨花区", lng: 118.683091, lat: 31.941923 },
|
"yh": { name: "雨花区", lng: 118.683091, lat: 31.941923 },
|
||||||
|
@ -141,7 +141,9 @@
|
||||||
mk.addTo(map);
|
mk.addTo(map);
|
||||||
el.addEventListener("click", function (e) {
|
el.addEventListener("click", function (e) {
|
||||||
/////////////////////////////////自定义输出内容//////////////////////////////////////
|
/////////////////////////////////自定义输出内容//////////////////////////////////////
|
||||||
console.log("跳转" + e.target.cusData.data);
|
console.log("跳转" + e.target.cusData.data + 111);
|
||||||
|
window.parent.postMessage({ data: "建筑工地", params: e.target.cusData.data, url: e.target.cusData.wisUrl }, '*');
|
||||||
|
// window.GotoScene("GongDi");
|
||||||
});
|
});
|
||||||
|
|
||||||
return mk;
|
return mk;
|
||||||
|
|
Loading…
Reference in New Issue