diff --git a/public/Publish/city-build/TemplateData/UnityProgress.js b/public/Publish/city-build/TemplateData/UnityProgress.js
index ceb0543..d8a448c 100644
--- a/public/Publish/city-build/TemplateData/UnityProgress.js
+++ b/public/Publish/city-build/TemplateData/UnityProgress.js
@@ -1,24 +1,24 @@
-function UnityProgress(unityInstance, progress) {
- if (!unityInstance.Module)
- return;
- if (!unityInstance.logo) {
- unityInstance.logo = document.createElement("div");
- unityInstance.logo.className = "logo " + unityInstance.Module.splashScreenStyle;
- unityInstance.container.appendChild(unityInstance.logo);
- }
- if (!unityInstance.progress) {
- unityInstance.progress = document.createElement("div");
- unityInstance.progress.className = "progress " + unityInstance.Module.splashScreenStyle;
- unityInstance.progress.empty = document.createElement("div");
- unityInstance.progress.empty.className = "empty";
- unityInstance.progress.appendChild(unityInstance.progress.empty);
- unityInstance.progress.full = document.createElement("div");
- unityInstance.progress.full.className = "full";
- unityInstance.progress.appendChild(unityInstance.progress.full);
- unityInstance.container.appendChild(unityInstance.progress);
- }
- unityInstance.progress.full.style.width = (100 * progress) + "%";
- unityInstance.progress.empty.style.width = (100 * (1 - progress)) + "%";
- if (progress == 1)
- unityInstance.logo.style.display = unityInstance.progress.style.display = "none";
+function UnityProgress(unityInstance, progress) {
+ if (!unityInstance.Module)
+ return;
+ if (!unityInstance.logo) {
+ unityInstance.logo = document.createElement("div");
+ unityInstance.logo.className = "logo " + unityInstance.Module.splashScreenStyle;
+ unityInstance.container.appendChild(unityInstance.logo);
+ }
+ if (!unityInstance.progress) {
+ unityInstance.progress = document.createElement("div");
+ unityInstance.progress.className = "progress " + unityInstance.Module.splashScreenStyle;
+ unityInstance.progress.empty = document.createElement("div");
+ unityInstance.progress.empty.className = "empty";
+ unityInstance.progress.appendChild(unityInstance.progress.empty);
+ unityInstance.progress.full = document.createElement("div");
+ unityInstance.progress.full.className = "full";
+ unityInstance.progress.appendChild(unityInstance.progress.full);
+ unityInstance.container.appendChild(unityInstance.progress);
+ }
+ unityInstance.progress.full.style.width = (100 * progress) + "%";
+ unityInstance.progress.empty.style.width = (100 * (1 - progress)) + "%";
+ if (progress == 1)
+ unityInstance.logo.style.display = unityInstance.progress.style.display = "none";
}
\ No newline at end of file
diff --git a/public/Publish/city-build/TemplateData/style.css b/public/Publish/city-build/TemplateData/style.css
index 45ceceb..223affe 100644
--- a/public/Publish/city-build/TemplateData/style.css
+++ b/public/Publish/city-build/TemplateData/style.css
@@ -1,30 +1,30 @@
-html,body{
- width: 100%;
- height: 100%;
- margin: 0px;
- overflow: hidden;
-}
-
-#unityContainer{
- width: 100%;
- height: 100%;
- margin: 0px;
-}
-.webgl-content * {border: 0; margin: 0; padding: 0}
-.webgl-content {position: absolute; top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%);}
-
-.webgl-content .logo, .progress {position: absolute; left: 50%; top: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%);}
-.webgl-content .logo {background: url('progressLogo.Light.png') no-repeat center / contain; width: 154px; height: 130px;}
-.webgl-content .progress {height: 18px; width: 141px; margin-top: 90px;}
-.webgl-content .progress .empty {background: url('progressEmpty.Light.png') no-repeat right / cover; float: right; width: 100%; height: 100%; display: inline-block;}
-.webgl-content .progress .full {background: url('progressFull.Light.png') no-repeat left / cover; float: left; width: 0%; height: 100%; display: inline-block;}
-
-.webgl-content .logo.Dark {background-image: url('progressLogo.Dark.png');}
-.webgl-content .progress.Dark .empty {background-image: url('progressEmpty.Dark.png');}
-.webgl-content .progress.Dark .full {background-image: url('progressFull.Dark.png');}
-
-.webgl-content .footer {margin-top: 5px; height: 38px; line-height: 38px; font-family: Helvetica, Verdana, Arial, sans-serif; font-size: 18px; display: none;}
-.webgl-content .footer .webgl-logo, .title, .fullscreen {height: 100%; display: inline-block; background: transparent center no-repeat;}
-.webgl-content .footer .webgl-logo {background-image: url('webgl-logo.png'); width: 204px; float: left;}
-.webgl-content .footer .title {margin-right: 10px; float: right;}
-.webgl-content .footer .fullscreen {background-image: url('fullscreen.png'); width: 38px; float: right;}
+html,body{
+ width: 100%;
+ height: 100%;
+ margin: 0px;
+ overflow: hidden;
+}
+
+#unityContainer{
+ width: 100%;
+ height: 100%;
+ margin: 0px;
+}
+.webgl-content * {border: 0; margin: 0; padding: 0}
+.webgl-content {position: absolute; top: 50%; left: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%);}
+
+.webgl-content .logo, .progress {position: absolute; left: 50%; top: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%);}
+.webgl-content .logo {background: url('progressLogo.Light.png') no-repeat center / contain; width: 154px; height: 130px;}
+.webgl-content .progress {height: 18px; width: 141px; margin-top: 90px;}
+.webgl-content .progress .empty {background: url('progressEmpty.Light.png') no-repeat right / cover; float: right; width: 100%; height: 100%; display: inline-block;}
+.webgl-content .progress .full {background: url('progressFull.Light.png') no-repeat left / cover; float: left; width: 0%; height: 100%; display: inline-block;}
+
+.webgl-content .logo.Dark {background-image: url('progressLogo.Dark.png');}
+.webgl-content .progress.Dark .empty {background-image: url('progressEmpty.Dark.png');}
+.webgl-content .progress.Dark .full {background-image: url('progressFull.Dark.png');}
+
+.webgl-content .footer {margin-top: 5px; height: 38px; line-height: 38px; font-family: Helvetica, Verdana, Arial, sans-serif; font-size: 18px; display: none;}
+.webgl-content .footer .webgl-logo, .title, .fullscreen {height: 100%; display: inline-block; background: transparent center no-repeat;}
+.webgl-content .footer .webgl-logo {background-image: url('webgl-logo.png'); width: 204px; float: left;}
+.webgl-content .footer .title {margin-right: 10px; float: right;}
+.webgl-content .footer .fullscreen {background-image: url('fullscreen.png'); width: 38px; float: right;}
diff --git a/public/Publish/city-build/index.html b/public/Publish/city-build/index.html
index 18a691a..50b578a 100644
--- a/public/Publish/city-build/index.html
+++ b/public/Publish/city-build/index.html
@@ -1,25 +1,25 @@
-
-
-
-
+
+
+
+
+ 全部用房
+
-

基地
+
+ 生产辅助用房
-

变电站
+
+ 生产用房
@@ -414,194 +414,50 @@
var cityOverColor = "#ff002a";//城市鼠标经过颜色
//socket
// var socket = io('wss://111.229.30.246:18443');
-var socket = io('ws://111.229.30.246:18444');
+// var socket = io('ws://111.229.30.246:18444');
//本地socket id
-var socketId = "dtfdzy";// new Date().getTime().toString();//改为自己的固定ID
+// var socketId = "dtfdzy";// new Date().getTime().toString();//改为自己的固定ID
//document.title = socketId;
+document.getElementById("map").oncontextmenu = function(e){
+return false;
+}
+document.getElementById("map").onmousedown = function(e){
+ if(e.button ==2){
+ parent.show()
+ }
+ }
//注册
-socket.emit('register', socketId);
+// socket.emit('register', socketId);
-//接收
-socket.on('receive', function (message) {
- switch (message) {
- case "0":
- console.log("注册成功!");
- break;
- default:
- console.log("其它消息:" + message);
- break;
- }
-});
+// //接收
+// socket.on('receive', function (message) {
+// switch (message) {
+// case "0":
+// console.log("注册成功!");
+// break;
+// default:
+// console.log("其它消息:" + message);
+// break;
+// }
+// });
-function send(val) {
- console.log("val",val)
- // var targetId = $("txtTarget").value;//目标页面socketId
- // var message = $("txtMessage").value;//发给目标页面的消息内容
- socket.emit('sendto', { target: 'fdzy', data: val });
-}
+// function send(val) {
+// console.log("val",val)
+// // var targetId = $("txtTarget").value;//目标页面socketId
+// // var message = $("txtMessage").value;//发给目标页面的消息内容
+// socket.emit('sendto', { target: 'fdzy', data: val });
+// }
// function $(id) {
// return document.getElementById(id);
// }
var positions = {
- // "nj": { name: "南京市", lng: 119.932628, lat: 32.473465, markers: [
- // { icon: "images/sgs.png", width: 200, height: 100, lng: 118.77416, lat: 32.0578, data: "省大楼" }] },
"nj": { name: "南京市", lng: 118.802997, lat: 32.066366 },
"njData": { name: "南京市", lng: 118.802997, lat: 32.066366},
- // "nj": { name: "南京市", lng: 118.802997, lat: 32.066366, markers: [
- // { icon: "images/floor2.png", width: 200, height: 100, lng: 118.744015, lat: 31.990507, data: "市大楼" }] },
- // "njData": { name: "南京市", lng: 118.802997, lat: 32.066366, markers: [
- // { icon: "images/floor2.png", width: 200, height: 100, lng: 118.744015, lat: 31.990507, data: "市大楼" },] },
- // "nj": { name: "南京市", lng: 118.802997, lat: 32.066366, markers: [
- // { icon: "images/floor2.png", width: 200, height: 100, lng: 118.744015, lat: 31.990507, data: "市大楼" }] },
- // "njData": { name: "南京市", lng: 118.802997, lat: 32.066366, markers: [
- // { icon: "images/floor2.png", width: 200, height: 100, lng: 118.744015, lat: 31.990507, data: "市大楼" },
- // { icon: "images/gc.png", width: 50, height: 20, lng: 118.976972, lat: 31.322781, data: "gc" },
- // { icon: "images/gl.png", width: 50, height: 20, lng: 118.76311325517088, lat: 32.0780463450443, data: "gl" },
- // { icon: "images/jy.png", width: 50, height: 20, lng: 118.71473206728729, lat: 32.01047746726674, data: "jy" },
- // { icon: "images/jn.png", width: 50, height: 20, lng: 118.80566892449599, lat: 31.827523158402315, data: "jn" },
- // { icon: "images/ls.png", width: 50, height: 20, lng: 119.057397, lat: 31.574872, data: "ls" },
- // { icon: "images/lh.png", width: 50, height: 20, lng: 118.83795657512042, lat: 32.3903835211603, data: "lh" },
- // { icon: "images/pk.png", width: 50, height: 20, lng: 118.58949874899827, lat: 32.05737447444322, data: "pk" },
- // { icon: "images/qx.png", width: 50, height: 20, lng: 118.92919207298758, lat: 32.12803511304287, data: "qx" },
- // { icon: "images/qh.png", width: 50, height: 20, lng: 118.82082851919154, lat: 32.006870857050345, data: "qh" },
- // { icon: "images/xw.png", width: 50, height: 20, lng: 118.84821532650221, lat: 32.06267580599376, data: "xw" },
- // { icon: "images/yh.png", width: 50, height: 20, lng: 118.683091, lat:31.941923, data: "yh" }] },
- // "pk": { name: "浦口区", lng: 118.58949874899827, lat: 32.05737447444322, markers: [
- // { icon: "images/gc.png", width: 50, height: 20, lng: 118.976972, lat: 31.322781, data: "gc" },
- // { icon: "images/gl.png", width: 50, height: 20, lng: 118.76311325517088, lat: 32.0780463450443, data: "gl" },
- // { icon: "images/jy.png", width: 50, height: 20, lng: 118.71473206728729, lat: 32.01047746726674, data: "jy" },
- // { icon: "images/jn.png", width: 50, height: 20, lng: 118.80566892449599, lat: 31.827523158402315, data: "jn" },
- // { icon: "images/ls.png", width: 50, height: 20, lng: 119.057397, lat: 31.574872, data: "ls" },
- // { icon: "images/lh.png", width: 50, height: 20, lng: 118.83795657512042, lat: 32.3903835211603, data: "lh" },
- // { icon: "images/pk.png", width: 50, height: 20, lng: 118.58949874899827, lat: 32.05737447444322, data: "pk" },
- // { icon: "images/qx.png", width: 50, height: 20, lng: 118.92919207298758, lat: 32.12803511304287, data: "qx" },
- // { icon: "images/qh.png", width: 50, height: 20, lng: 118.82082851919154, lat: 32.006870857050345, data: "qh" },
- // { icon: "images/xw.png", width: 50, height: 20, lng: 118.84821532650221, lat: 32.06267580599376, data: "xw" },
- // { icon: "images/yh.png", width: 50, height: 20, lng: 118.683091, lat:31.941923, data: "yh" }] },
- // "jy": { name: "建邺区", lng: 118.71473206728729, lat: 32.01047746726674 , markers: [
- // { icon: "images/gc.png", width: 50, height: 20, lng: 118.976972, lat: 31.322781, data: "gc" },
- // { icon: "images/gl.png", width: 50, height: 20, lng: 118.76311325517088, lat: 32.0780463450443, data: "gl" },
- // { icon: "images/jy.png", width: 50, height: 20, lng: 118.71473206728729, lat: 32.01047746726674, data: "jy" },
- // { icon: "images/jn.png", width: 50, height: 20, lng: 118.80566892449599, lat: 31.827523158402315, data: "jn" },
- // { icon: "images/ls.png", width: 50, height: 20, lng: 119.057397, lat: 31.574872, data: "ls" },
- // { icon: "images/lh.png", width: 50, height: 20, lng: 118.83795657512042, lat: 32.3903835211603, data: "lh" },
- // { icon: "images/pk.png", width: 50, height: 20, lng: 118.58949874899827, lat: 32.05737447444322, data: "pk" },
- // { icon: "images/qx.png", width: 50, height: 20, lng: 118.92919207298758, lat: 32.12803511304287, data: "qx" },
- // { icon: "images/qh.png", width: 50, height: 20, lng: 118.82082851919154, lat: 32.006870857050345, data: "qh" },
- // { icon: "images/xw.png", width: 50, height: 20, lng: 118.84821532650221, lat: 32.06267580599376, data: "xw" },
- // { icon: "images/yh.png", width: 50, height: 20, lng: 118.683091, lat:31.941923, data: "yh" }] },
- // "gl": { name: "鼓楼区", lng: 118.76311325517088, lat: 32.0780463450443 , markers: [
- // { icon: "images/floor2.png", width: 200, height: 100, lng: 118.744015, lat: 31.990507, data: "市大楼" } ,{ icon: "images/gc.png", width: 50, height: 20, lng: 118.976972, lat: 31.322781, data: "gc" },
- // { icon: "images/gl.png", width: 50, height: 20, lng: 118.76311325517088, lat: 32.0780463450443, data: "gl" },
- // { icon: "images/jy.png", width: 50, height: 20, lng: 118.71473206728729, lat: 32.01047746726674, data: "jy" },
- // { icon: "images/jn.png", width: 50, height: 20, lng: 118.80566892449599, lat: 31.827523158402315, data: "jn" },
- // { icon: "images/ls.png", width: 50, height: 20, lng: 119.057397, lat: 31.574872, data: "ls" },
- // { icon: "images/lh.png", width: 50, height: 20, lng: 118.83795657512042, lat: 32.3903835211603, data: "lh" },
- // { icon: "images/pk.png", width: 50, height: 20, lng: 118.58949874899827, lat: 32.05737447444322, data: "pk" },
- // { icon: "images/qx.png", width: 50, height: 20, lng: 118.92919207298758, lat: 32.12803511304287, data: "qx" },
- // { icon: "images/qh.png", width: 50, height: 20, lng: 118.82082851919154, lat: 32.006870857050345, data: "qh" },
- // { icon: "images/xw.png", width: 50, height: 20, lng: 118.84821532650221, lat: 32.06267580599376, data: "xw" },
- // { icon: "images/yh.png", width: 50, height: 20, lng: 118.683091, lat:31.941923, data: "yh" }] },
- // "yh": { name: "雨花区", lng: 118.683091, lat: 31.941923 , markers: [
- // { icon: "images/gc.png", width: 50, height: 20, lng: 118.976972, lat: 31.322781, data: "gc" },
- // { icon: "images/gl.png", width: 50, height: 20, lng: 118.76311325517088, lat: 32.0780463450443, data: "gl" },
- // { icon: "images/jy.png", width: 50, height: 20, lng: 118.71473206728729, lat: 32.01047746726674, data: "jy" },
- // { icon: "images/jn.png", width: 50, height: 20, lng: 118.80566892449599, lat: 31.827523158402315, data: "jn" },
- // { icon: "images/ls.png", width: 50, height: 20, lng: 119.057397, lat: 31.574872, data: "ls" },
- // { icon: "images/lh.png", width: 50, height: 20, lng: 118.83795657512042, lat: 32.3903835211603, data: "lh" },
- // { icon: "images/pk.png", width: 50, height: 20, lng: 118.58949874899827, lat: 32.05737447444322, data: "pk" },
- // { icon: "images/qx.png", width: 50, height: 20, lng: 118.92919207298758, lat: 32.12803511304287, data: "qx" },
- // { icon: "images/qh.png", width: 50, height: 20, lng: 118.82082851919154, lat: 32.006870857050345, data: "qh" },
- // { icon: "images/xw.png", width: 50, height: 20, lng: 118.84821532650221, lat: 32.06267580599376, data: "xw" },
- // { icon: "images/yh.png", width: 50, height: 20, lng: 118.683091, lat:31.941923, data: "yh" }] },
- // "qh": { name: "秦淮区", lng: 118.82082851919154, lat: 32.006870857050345 , markers: [
- // { icon: "images/gc.png", width: 50, height: 20, lng: 118.976972, lat: 31.322781, data: "gc" },
- // { icon: "images/gl.png", width: 50, height: 20, lng: 118.76311325517088, lat: 32.0780463450443, data: "gl" },
- // { icon: "images/jy.png", width: 50, height: 20, lng: 118.71473206728729, lat: 32.01047746726674, data: "jy" },
- // { icon: "images/jn.png", width: 50, height: 20, lng: 118.80566892449599, lat: 31.827523158402315, data: "jn" },
- // { icon: "images/ls.png", width: 50, height: 20, lng: 119.057397, lat: 31.574872, data: "ls" },
- // { icon: "images/lh.png", width: 50, height: 20, lng: 118.83795657512042, lat: 32.3903835211603, data: "lh" },
- // { icon: "images/pk.png", width: 50, height: 20, lng: 118.58949874899827, lat: 32.05737447444322, data: "pk" },
- // { icon: "images/qx.png", width: 50, height: 20, lng: 118.92919207298758, lat: 32.12803511304287, data: "qx" },
- // { icon: "images/qh.png", width: 50, height: 20, lng: 118.82082851919154, lat: 32.006870857050345, data: "qh" },
- // { icon: "images/xw.png", width: 50, height: 20, lng: 118.84821532650221, lat: 32.06267580599376, data: "xw" },
- // { icon: "images/yh.png", width: 50, height: 20, lng: 118.683091, lat:31.941923, data: "yh" }] },
- // "jn": { name: "江宁区", lng: 118.80566892449599, lat: 31.827523158402315 , markers: [
- // { icon: "images/gc.png", width: 50, height: 20, lng: 118.976972, lat: 31.322781, data: "gc" },
- // { icon: "images/gl.png", width: 50, height: 20, lng: 118.76311325517088, lat: 32.0780463450443, data: "gl" },
- // { icon: "images/jy.png", width: 50, height: 20, lng: 118.71473206728729, lat: 32.01047746726674, data: "jy" },
- // { icon: "images/jn.png", width: 50, height: 20, lng: 118.80566892449599, lat: 31.827523158402315, data: "jn" },
- // { icon: "images/ls.png", width: 50, height: 20, lng: 119.057397, lat: 31.574872, data: "ls" },
- // { icon: "images/lh.png", width: 50, height: 20, lng: 118.83795657512042, lat: 32.3903835211603, data: "lh" },
- // { icon: "images/pk.png", width: 50, height: 20, lng: 118.58949874899827, lat: 32.05737447444322, data: "pk" },
- // { icon: "images/qx.png", width: 50, height: 20, lng: 118.92919207298758, lat: 32.12803511304287, data: "qx" },
- // { icon: "images/qh.png", width: 50, height: 20, lng: 118.82082851919154, lat: 32.006870857050345, data: "qh" },
- // { icon: "images/xw.png", width: 50, height: 20, lng: 118.84821532650221, lat: 32.06267580599376, data: "xw" },
- // { icon: "images/yh.png", width: 50, height: 20, lng: 118.683091, lat:31.941923, data: "yh" }] },
- // "ls": { name: "溧水区", lng: 119.057397, lat: 31.574872 , markers: [
- // { icon: "images/gc.png", width: 50, height: 20, lng: 118.976972, lat: 31.322781, data: "gc" },
- // { icon: "images/gl.png", width: 50, height: 20, lng: 118.76311325517088, lat: 32.0780463450443, data: "gl" },
- // { icon: "images/jy.png", width: 50, height: 20, lng: 118.71473206728729, lat: 32.01047746726674, data: "jy" },
- // { icon: "images/jn.png", width: 50, height: 20, lng: 118.80566892449599, lat: 31.827523158402315, data: "jn" },
- // { icon: "images/ls.png", width: 50, height: 20, lng: 119.057397, lat: 31.574872, data: "ls" },
- // { icon: "images/lh.png", width: 50, height: 20, lng: 118.83795657512042, lat: 32.3903835211603, data: "lh" },
- // { icon: "images/pk.png", width: 50, height: 20, lng: 118.58949874899827, lat: 32.05737447444322, data: "pk" },
- // { icon: "images/qx.png", width: 50, height: 20, lng: 118.92919207298758, lat: 32.12803511304287, data: "qx" },
- // { icon: "images/qh.png", width: 50, height: 20, lng: 118.82082851919154, lat: 32.006870857050345, data: "qh" },
- // { icon: "images/xw.png", width: 50, height: 20, lng: 118.84821532650221, lat: 32.06267580599376, data: "xw" },
- // { icon: "images/yh.png", width: 50, height: 20, lng: 118.683091, lat:31.941923, data: "yh" }] },
- // "gc": { name: "高淳区", lng: 118.976972, lat: 31.322781 , markers: [
- // { icon: "images/gc.png", width: 50, height: 20, lng: 118.976972, lat: 31.322781, data: "gc" },
- // { icon: "images/gl.png", width: 50, height: 20, lng: 118.76311325517088, lat: 32.0780463450443, data: "gl" },
- // { icon: "images/jy.png", width: 50, height: 20, lng: 118.71473206728729, lat: 32.01047746726674, data: "jy" },
- // { icon: "images/jn.png", width: 50, height: 20, lng: 118.80566892449599, lat: 31.827523158402315, data: "jn" },
- // { icon: "images/ls.png", width: 50, height: 20, lng: 119.057397, lat: 31.574872, data: "ls" },
- // { icon: "images/lh.png", width: 50, height: 20, lng: 118.83795657512042, lat: 32.3903835211603, data: "lh" },
- // { icon: "images/pk.png", width: 50, height: 20, lng: 118.58949874899827, lat: 32.05737447444322, data: "pk" },
- // { icon: "images/qx.png", width: 50, height: 20, lng: 118.92919207298758, lat: 32.12803511304287, data: "qx" },
- // { icon: "images/qh.png", width: 50, height: 20, lng: 118.82082851919154, lat: 32.006870857050345, data: "qh" },
- // { icon: "images/xw.png", width: 50, height: 20, lng: 118.84821532650221, lat: 32.06267580599376, data: "xw" },
- // { icon: "images/yh.png", width: 50, height: 20, lng: 118.683091, lat:31.941923, data: "yh" }] },
- // "lh": { name: "六合区", lng: 118.83795657512042, lat: 32.3903835211603 , markers: [
- // { icon: "images/gc.png", width: 50, height: 20, lng: 118.976972, lat: 31.322781, data: "gc" },
- // { icon: "images/gl.png", width: 50, height: 20, lng: 118.76311325517088, lat: 32.0780463450443, data: "gl" },
- // { icon: "images/jy.png", width: 50, height: 20, lng: 118.71473206728729, lat: 32.01047746726674, data: "jy" },
- // { icon: "images/jn.png", width: 50, height: 20, lng: 118.80566892449599, lat: 31.827523158402315, data: "jn" },
- // { icon: "images/ls.png", width: 50, height: 20, lng: 119.057397, lat: 31.574872, data: "ls" },
- // { icon: "images/lh.png", width: 50, height: 20, lng: 118.83795657512042, lat: 32.3903835211603, data: "lh" },
- // { icon: "images/pk.png", width: 50, height: 20, lng: 118.58949874899827, lat: 32.05737447444322, data: "pk" },
- // { icon: "images/qx.png", width: 50, height: 20, lng: 118.92919207298758, lat: 32.12803511304287, data: "qx" },
- // { icon: "images/qh.png", width: 50, height: 20, lng: 118.82082851919154, lat: 32.006870857050345, data: "qh" },
- // { icon: "images/xw.png", width: 50, height: 20, lng: 118.84821532650221, lat: 32.06267580599376, data: "xw" },
- // { icon: "images/yh.png", width: 50, height: 20, lng: 118.683091, lat:31.941923, data: "yh" }] },
- // "qx": { name: "栖霞区", lng: 118.92919207298758, lat: 32.12803511304287 , markers: [
- // { icon: "images/gc.png", width: 50, height: 20, lng: 118.976972, lat: 31.322781, data: "gc" },
- // { icon: "images/gl.png", width: 50, height: 20, lng: 118.76311325517088, lat: 32.0780463450443, data: "gl" },
- // { icon: "images/jy.png", width: 50, height: 20, lng: 118.71473206728729, lat: 32.01047746726674, data: "jy" },
- // { icon: "images/jn.png", width: 50, height: 20, lng: 118.80566892449599, lat: 31.827523158402315, data: "jn" },
- // { icon: "images/ls.png", width: 50, height: 20, lng: 119.057397, lat: 31.574872, data: "ls" },
- // { icon: "images/lh.png", width: 50, height: 20, lng: 118.83795657512042, lat: 32.3903835211603, data: "lh" },
- // { icon: "images/pk.png", width: 50, height: 20, lng: 118.58949874899827, lat: 32.05737447444322, data: "pk" },
- // { icon: "images/qx.png", width: 50, height: 20, lng: 118.92919207298758, lat: 32.12803511304287, data: "qx" },
- // { icon: "images/qh.png", width: 50, height: 20, lng: 118.82082851919154, lat: 32.006870857050345, data: "qh" },
- // { icon: "images/xw.png", width: 50, height: 20, lng: 118.84821532650221, lat: 32.06267580599376, data: "xw" },
- // { icon: "images/yh.png", width: 50, height: 20, lng: 118.683091, lat:31.941923, data: "yh" }] },
- // "xw": { name: "玄武区", lng: 118.84821532650221, lat: 32.06267580599376 , markers: [
- // { icon: "images/gc.png", width: 50, height: 20, lng: 118.976972, lat: 31.322781, data: "gc" },
- // { icon: "images/gl.png", width: 50, height: 20, lng: 118.76311325517088, lat: 32.0780463450443, data: "gl" },
- // { icon: "images/jy.png", width: 50, height: 20, lng: 118.71473206728729, lat: 32.01047746726674, data: "jy" },
- // { icon: "images/jn.png", width: 50, height: 20, lng: 118.80566892449599, lat: 31.827523158402315, data: "jn" },
- // { icon: "images/ls.png", width: 50, height: 20, lng: 119.057397, lat: 31.574872, data: "ls" },
- // { icon: "images/lh.png", width: 50, height: 20, lng: 118.83795657512042, lat: 32.3903835211603, data: "lh" },
- // { icon: "images/pk.png", width: 50, height: 20, lng: 118.58949874899827, lat: 32.05737447444322, data: "pk" },
- // { icon: "images/qx.png", width: 50, height: 20, lng: 118.92919207298758, lat: 32.12803511304287, data: "qx" },
- // { icon: "images/qh.png", width: 50, height: 20, lng: 118.82082851919154, lat: 32.006870857050345, data: "qh" },
- // { icon: "images/xw.png", width: 50, height: 20, lng: 118.84821532650221, lat: 32.06267580599376, data: "xw" },
- // { icon: "images/yh.png", width: 50, height: 20, lng: 118.683091, lat:31.941923, data: "yh" }] }
+
}
var layers = {}
@@ -612,6 +468,13 @@ function send(val) {
pictures: "aegis://styles/aegis/Satellite512"//卫星
}
var njfc = []
+ var rightMap=''
+ function getMessageFromParent(val){
+ // loadJDQK()
+ $(".fc").hide();
+ $(".td").hide();
+ loadJDdw(val)
+ }
// 申请的key和sn
SGMap.tokenTask
.login("1a6fc765e72b36819428016bed30ff48", "5916636e73f03e5dbdf275f810fc7d62")
@@ -644,7 +507,8 @@ function send(val) {
// 地图默认字体
localIdeographFontFamily: "Microsoft YoHei"
});
-
+ loadFC();
+ loadTD();
MapFill();
loadMarkers(defaultArea);
//reportLocation();
@@ -660,8 +524,7 @@ function send(val) {
function MapFill() {
SGMap.plugin(['SGMap.DistrictTask']).then(function (res) {
var districtTask = new SGMap.DistrictTask()
- loadFC();
- loadTD();
+
districtTask
.searchDistrict({
keyword: '南京市',
@@ -671,7 +534,6 @@ function send(val) {
})
.then(function (result) {
$.get("data/map/js.json", function (res) {
- console.log(res);
layers.jiangsu = new Object();
layers.jiangsu.line = createLine("jiangsu", res.jiangsu, '#3787ff', 2).id;
layers.jiangsu.polygon = createPolygon("jiangsu", res.jiangsu, '#3787ff', 0.1).id;
@@ -755,6 +617,7 @@ function send(val) {
function createCities(cityName, cityData) {
visibleTD()
+ visibleFC()
var hidePolygon = createPolygon("hide" + cityName, cityData, "#000000", 0);
createPolygon("show" + cityName, cityData, cityOverColor, 0.1);
createLine("show" + cityName, cityData, cityOverColor, 1);
@@ -905,6 +768,7 @@ function send(val) {
tip.appendChild(pos);
tip.pos = pos;
el.addEventListener("mouseover", function (e) {
+
$(e.target.tip).show();//(e.target.cusData.street+"("+e.target.cusData.zongdi+")");
$(e.target.tip.txt).html(e.target.cusData.tudi);
$(e.target.tip.pos).html(e.target.cusData.jd);
@@ -919,6 +783,7 @@ function send(val) {
el.addEventListener("click", function (e) {
console.log("e",e.target.cusData.jd)
window.parent.postMessage({ data:"变电站",params:e.target.cusData.jd,type:e.target.cusData.type},'*');
+ // $(e.target.tip).show();
});
// 如果不传el,会默认给一个蓝色水滴图标
var mk = new SGMap.Marker(el, {
@@ -969,17 +834,22 @@ function send(val) {
el.addEventListener("mouseover", function (e) {
$(e.target.tip).show();//(e.target.cusData.street+"("+e.target.cusData.zongdi+")");
+ console.log("e.target.tip",e.target.tip)
$(e.target.tip.txt).html(e.target.cusData.tudi);
$(e.target.tip.pos).html(e.target.cusData.jd);
- // $(e.target.tip.txt).html(e.target.cusData.street+"("+e.target.cusData.zongdi+")");
- // $(e.target.tip.pos).html(e.target.cusData.province+e.target.cusData.city+e.target.cusData.area+e.target.cusData.street);
+
});
el.addEventListener("mouseleave", function (e) {
$(e.target.tip).hide();
});
el.addEventListener("click", function (e) {
console.log("e",e.target.cusData.jd)
- window.parent.postMessage({ data:"办公用地",params:e.target.cusData.jd,type:e.target.cusData.type},'*');
+
+ parent.getFromIframe({ data:"办公用地",params:e.target.cusData.jd,type:e.target.cusData.type})
+ $(e.target.tip).show();
+ $(e.target.tip.txt).html(e.target.cusData.tudi);
+ $(e.target.tip.pos).html(e.target.cusData.jd);
+
});
// 如果不传el,会默认给一个蓝色水滴图标
var mk = new SGMap.Marker(el, {
@@ -993,17 +863,176 @@ function send(val) {
}
+ }
+ });
+ }
+ //基地定位
+ function loadJDQK() {
+ $(".jd").hide();
+ $.get("data/jd.json", function (res) {
+ for (var i in res) {
+ var row = res[i];
+ var lng = parseFloat(row.position.substring(0, row.position.indexOf(',')));
+ var lat = parseFloat(row.position.substr(row.position.indexOf(',') + 1));
+ // console.log(lng, lat);
+ if (lng != NaN && lat != NaN && lng > 100 && lat < 100) {
+ //画marker点
+ var el = document.createElement("div");
+
+ el.className = "marker";
+ el.cusData = row;
+ el.lng = lng;
+ el.lat = lat;
+ el.setAttribute("class","jd");
+ var tip = document.createElement("div");
+ tip.setAttribute("class","wnd");
+ el.appendChild(tip);
+ el.tip = tip;
+ var txt = document.createElement("div");
+ txt.innerText = "龙园西路113号(枫亚湾5幢701)";
+ txt.setAttribute("class","txt");
+ tip.appendChild(txt);
+ tip.txt = txt;
+ var pos = document.createElement("div");
+ pos.innerText = "江苏省南京市";
+ pos.setAttribute("class","pos");
+ tip.appendChild(pos);
+ tip.pos = pos;
+ // $(el.tip).hide();
+ // visiblejddis()
+ // if(val== el.cusData.jd){
+ // $(el.tip).show();
+ // $(el.tip.txt).html(el.cusData.tudi);
+ // $(el.tip.pos).html(el.cusData.jd);
+ // visiblejd()
+ // }else{
+ // $(el.tip).hide();
+ // }
+
+ el.addEventListener("mouseover", function (e) {
+ // $(e.target.tip).show();//(e.target.cusData.street+"("+e.target.cusData.zongdi+")");
+ // $(e.target.tip.txt).html(e.target.cusData.tudi);
+ // $(e.target.tip.pos).html(e.target.cusData.jd);
+ });
+ el.addEventListener("mouseleave", function (e) {
+ // $(e.target.tip).hide();
+ });
+ el.addEventListener("click", function (e) {
+ // $(e.target.tip).show();
+ // $(e.target.tip.txt).html(e.target.cusData.tudi);
+ // $(e.target.tip.pos).html(e.target.cusData.jd);
+
+ });
+ // 如果不传el,会默认给一个蓝色水滴图标
+
+ var mk = new SGMap.Marker(el, {
+ // marker相对经纬度点坐标点的位置
+ anchor: "bottom",
+ // 相对于元素中心点,偏移的像素距离,负数代表向左和向上
+ offset: [-15.5, -18]
+ });
+
+ mk.setLngLat([lng, lat]);
+ mk.addTo(map);
+ }
+
+
+ }
+ });
+ }
+ function loadJDdw(val) {
+ console.log("val",val)
+ $.get("data/jd.json", function (res) {
+ for (var i in res) {
+ var row = res[i];
+ var lng = parseFloat(row.position.substring(0, row.position.indexOf(',')));
+ var lat = parseFloat(row.position.substr(row.position.indexOf(',') + 1));
+ // console.log(lng, lat);
+ if (lng != NaN && lat != NaN && lng > 100 && lat < 100) {
+ //画marker点
+ var el = document.createElement("div");
+
+ el.className = "marker";
+ el.cusData = row;
+ el.lng = lng;
+ el.lat = lat;
+ el.setAttribute("class","jd");
+ var tip = document.createElement("div");
+ tip.setAttribute("class","wnd");
+ el.appendChild(tip);
+ el.tip = tip;
+ var txt = document.createElement("div");
+ txt.innerText = "龙园西路113号(枫亚湾5幢701)";
+ txt.setAttribute("class","txt");
+ tip.appendChild(txt);
+ tip.txt = txt;
+ var pos = document.createElement("div");
+ pos.innerText = "江苏省南京市";
+ pos.setAttribute("class","pos");
+ tip.appendChild(pos);
+ tip.pos = pos;
+ $(el.tip).hide();
+ // loadJDQK()
+ // visiblejddis()
+ if(val == el.cusData.jd){
+ console.log("el.cusData.jd",el.cusData.jd)
+ // console.log("el.tip",el.tip)
+ $(el.tip).show();
+ $(el.tip.txt).html(el.cusData.tudi);
+ $(el.tip.pos).html(el.cusData.jd);
+ visiblejd()
+ }else{
+ $(el.tip).hide();
+ // visiblejd()
+ // $(el.tip).hide();
+ // console.log("el.tip",el.tip)
+ // visiblejddis()
+ }
+
+ el.addEventListener("mouseover", function (e) {
+ // $(e.target.tip).show();//(e.target.cusData.street+"("+e.target.cusData.zongdi+")");
+ // $(e.target.tip.txt).html(e.target.cusData.tudi);
+ // $(e.target.tip.pos).html(e.target.cusData.jd);
+ });
+ el.addEventListener("mouseleave", function (e) {
+ // $(e.target.tip).hide();
+ });
+ el.addEventListener("click", function (e) {
+ // $(e.target.tip).show();
+ // $(e.target.tip.txt).html(e.target.cusData.tudi);
+ // $(e.target.tip.pos).html(e.target.cusData.jd);
+
+ });
+ // 如果不传el,会默认给一个蓝色水滴图标
+
+ var mk = new SGMap.Marker(el, {
+ // marker相对经纬度点坐标点的位置
+ anchor: "bottom",
+ // 相对于元素中心点,偏移的像素距离,负数代表向左和向上
+ offset: [-15.5, -18]
+ });
+
+ mk.setLngLat([lng, lat]);
+ mk.addTo(map);
+ }
+
+
}
});
}
function show(val){
- console.log("val",val)
- if(val=='jd'){
+ if(val=='qb'){
+ visibleTD()
+ visibleFC()
+ $(".jd").hide();
+ }else if(val=='jd'){
visibleTD()
$(".fc").hide();
+ $(".jd").hide();
}else{
visibleFC()
$(".td").hide();
+ $(".jd").hide();
}
}
function visibleFC(val){
@@ -1017,10 +1046,16 @@ function send(val) {
function visibleTD(val){
$(".td").show();
- // if(val)
- // $(".td").show();
- // else
- // $(".td").hide();
+
+ }
+ //
+ function visiblejd(val){
+ $(".jd").show();
+
+ }
+ function visiblejddis(val){
+ $(".jd").hide();
+
}
/*
1.获取2个经纬度之间的距离
diff --git a/src/assets/landRes/1.png b/src/assets/landRes/1.png
new file mode 100644
index 0000000..d8d2c6f
Binary files /dev/null and b/src/assets/landRes/1.png differ
diff --git a/src/assets/landRes/bdc.png b/src/assets/landRes/bdc.png
new file mode 100644
index 0000000..51b5365
Binary files /dev/null and b/src/assets/landRes/bdc.png differ
diff --git a/src/assets/landRes/bigBox.png b/src/assets/landRes/bigBox.png
new file mode 100644
index 0000000..4bf1ea7
Binary files /dev/null and b/src/assets/landRes/bigBox.png differ
diff --git a/src/assets/landRes/boxM.png b/src/assets/landRes/boxM.png
new file mode 100644
index 0000000..57e1be6
Binary files /dev/null and b/src/assets/landRes/boxM.png differ
diff --git a/src/assets/landRes/boxX.png b/src/assets/landRes/boxX.png
new file mode 100644
index 0000000..23347b6
Binary files /dev/null and b/src/assets/landRes/boxX.png differ
diff --git a/src/assets/landRes/fdc.png b/src/assets/landRes/fdc.png
new file mode 100644
index 0000000..ac2d06b
Binary files /dev/null and b/src/assets/landRes/fdc.png differ
diff --git a/src/assets/landRes/floor.png b/src/assets/landRes/floor.png
new file mode 100644
index 0000000..2ec50e4
Binary files /dev/null and b/src/assets/landRes/floor.png differ
diff --git a/src/assets/landRes/qq.png b/src/assets/landRes/qq.png
new file mode 100644
index 0000000..aa18a5b
Binary files /dev/null and b/src/assets/landRes/qq.png differ
diff --git a/src/assets/landRes/tdz.png b/src/assets/landRes/tdz.png
new file mode 100644
index 0000000..6715b6e
Binary files /dev/null and b/src/assets/landRes/tdz.png differ
diff --git a/src/assets/left.png b/src/assets/left.png
index bac6823..0d3759f 100644
Binary files a/src/assets/left.png and b/src/assets/left.png differ
diff --git a/src/assets/right.png b/src/assets/right.png
index f3a2cd9..a960f95 100644
Binary files a/src/assets/right.png and b/src/assets/right.png differ
diff --git a/src/components/BasicBox4/index.vue b/src/components/BasicBox4/index.vue
index 59907b0..fa885a4 100644
--- a/src/components/BasicBox4/index.vue
+++ b/src/components/BasicBox4/index.vue
@@ -5,7 +5,7 @@
{{ title }}
-