sgworld = window.external.createsgworld();
|
$(function () {
|
$(".imgx").each(function () {
|
$(this).attr("data-sel", "f");
|
var d = $(this).attr("src");
|
var reg = /img\/(.*).png/;
|
var dd = reg.exec(d);
|
$(this).attr("data-mr", d);
|
$(this).attr("data-xz", "img/" + dd[1] + "xz.png");
|
});
|
$(".imgx").click(function () {
|
if ($(this).attr("data-sel") == "f") {
|
$(".imgx").each(function () {
|
$(this).attr("src", $(this).attr("data-mr"))
|
$(this).attr("data-sel", "f");
|
});
|
$(this).attr("data-sel", "t");
|
var dd = $(this).attr("data-xz");
|
$(this).attr("src", dd);
|
|
} else {
|
$(".imgx").each(function () {
|
$(this).attr("src", $(this).attr("data-mr"))
|
$(this).attr("data-sel", "f");
|
});
|
}
|
var imgdata = $(this).attr("data-img");
|
switch (imgdata) {
|
case "dxpmfx":
|
dxpmfx();
|
break;
|
case "qcdtlj":
|
hz(1012, 26);
|
break;
|
case "sqdb":
|
sqdb();
|
break;
|
case "qxmx":
|
hz(2110, 0);
|
break;
|
case "jzwmx":
|
hz(1012, 14);
|
break;
|
case "swjmfx":
|
swjmfx();
|
break;
|
case "hzjx":
|
hz(1012, 6);
|
break;
|
case "shiyufx":
|
shiyufx();
|
break;
|
case "hzlzt":
|
hz(1012, 23);
|
break;
|
case "mxwj":
|
mxwj();
|
break;
|
case "hzqt":
|
hz(1012, 21);
|
break;
|
case "tjfx":
|
tjfx();
|
break;
|
case "tjxfx":
|
tjxfx();
|
break;
|
case "tsfx":
|
tsfx();
|
break;
|
case "yxtc":
|
hz(1014, 2);
|
break;
|
case "tcsj":
|
hz(1013, 0);
|
break;
|
case "tpbq":
|
tpbq();
|
break;
|
case "cjwb":
|
cjwb();
|
break;
|
case "projectTree":
|
projectTree();
|
break;
|
case "dxxg":
|
hz(1012, 15);
|
break;
|
case "hsymfx":
|
hsymfx();
|
break;
|
case "hzyx":
|
hz(1012, 9);
|
break;
|
case "hzyzt":
|
hz(1012, 20);
|
break;
|
case "hzyzhuit":
|
hz(1012, 22);
|
break;
|
// case "coorsys":
|
// coorsys();
|
// break;
|
case "yxdbfx":
|
yxdbfx();
|
break;
|
}
|
});
|
$(".imgx").hover(function () {
|
var dd = $(this).attr("data-xz");
|
$(this).attr("src", dd);
|
$(this).focus();
|
}, function () {
|
if($(this).attr("data-sel") == "f"){
|
var mr = $(this).attr("data-mr");
|
$(this).attr("src", mr);
|
}
|
});
|
})
|
|
|
var url = window.location.href.substring(0, window.location.href.lastIndexOf('/') + 1);
|
|
//坐标系工具
|
var coorsystatus = true;
|
|
function coorsys() {
|
if (coorsystatus) {
|
window.external.createPmDialogDock('coorsystem', url + "tool/CoordSystem.html?lang=coorsystem", 300, 300, 200, 1500, -1, -1);
|
coorsystatus = false;
|
} else {
|
window.external.closeDialog("coorsystem");
|
coorsystatus = true;
|
}
|
}
|
//绘制
|
function hz(command, param) {
|
sgworld.Command.Execute(command, param);
|
}
|
|
//地形剖面分析
|
var dxpmfxstatus = true;
|
|
function dxpmfx() {
|
if (dxpmfxstatus) {
|
window.external.createPmDialogDock('tool', url + "tool/TerrainProfile.html?lang=terrainpro", 240, 160, 50, -1, -1, 10);
|
tjxstatus = false;
|
dxpmfxstatus = false;
|
} else {
|
window.external.closeDialog("tool");
|
dxpmfxstatus = true;
|
}
|
}
|
|
//双球对比
|
var dd = true, globe;
|
|
function sqdb() {
|
var title = "多期数据";
|
if (!globe) {
|
globe = window.external.createMultScreen();
|
//globe.Open("http://118.213.95.34/SG/projects/init.434250");
|
globe.open(sqFly);
|
}
|
var mode = window.external.setShowMode(7);
|
if (mode) {
|
sgworld.Application.Multiple3DWindows.SetAsLeader();
|
sgworld.Application.Multiple3DWindows.LinkPosition(globe);
|
|
var width = 125, height = 25;
|
var left = 1920 / 2 - 20 - width - 20;
|
|
showHtmlBySG(sgworld, title, location.origin + "/checkbox.html", left, 200, width, height, false);
|
showHtmlBySG(globe, title, location.origin + "/checkbox.html", 20, 200, width, height, false);
|
} else {
|
if (sgworld.Window.GetPopupByCaption(title) != null) {
|
sgworld.Window.RemovePopupByCaption(title);
|
}
|
if (globe.Window.GetPopupByCaption(title) != null) {
|
globe.Window.RemovePopupByCaption(title);
|
}
|
sgworld.Application.Multiple3DWindows.UnlinkPosition();
|
}
|
}
|
|
function showHtmlBySG(sg, title, url, left, top, width, height, showCaption) {
|
if (sg.Window.GetPopupByCaption(title) != null) {
|
sg.Window.RemovePopupByCaption(title);
|
}
|
|
var popup = sg.Creator.CreatePopupMessage(title, url, left, top, width, height);
|
popup.AllowResize = true;
|
popup.ShowCaption = true;
|
popup.AllowDrag = true;
|
popup.Width = width;
|
popup.Height = height;
|
popup.ShowCaption = showCaption;
|
|
sg.Window.ShowPopup(popup);
|
}
|
|
//影像对比分析
|
var dbfxstatus = true;
|
|
function yxdbfx() {
|
if (dbfxstatus) {
|
//var dd= sgworld.Creator.CreatePopupMessage("tool", url + "tool/ImageComparisonPopup.html?lang=imagecom", 500, 150, 400, 140);
|
//sgworld.Window.ShowPopup(dd);
|
window.external.createPmDialogDock('tool', url + "tool/ImageComparisonPopup.html?lang=imagecom", 380, 100, 50, -1, -1, 10);
|
tjxstatus = false;
|
dbfxstatus = false
|
} else {
|
window.external.closeDialog("tool");
|
dbfxstatus = true;
|
}
|
}
|
|
//三维截面分析
|
var swjmfxStatus = true;
|
|
function swjmfx() {
|
if (swjmfxStatus) {
|
window.external.createPmDialogDock('tool', url + "tool/CrossSection.html?lang=cross", 240, 180, 50, -1, -1, 10);
|
tjxstatus = false;
|
swjmfxStatus = false;
|
} else {
|
window.external.closeDialog('tool');
|
swjmfxStatus = true;
|
}
|
}
|
|
//视域分析
|
function shiyufx() {
|
sgworld.Command.Execute(2117, 0);
|
}
|
|
//模型文件
|
function mxwj() {
|
sgworld.Command.Execute(1012, 13);
|
}
|
|
//体积分析
|
function tjfx() {
|
sgworld.Command.Execute(1045, 0);
|
}
|
|
//天际线分析
|
var tjxstatus = true;
|
|
function tjxfx() {
|
if (tjxstatus) {
|
window.external.createPmDialogDock('tool', url + "tool/ThreatDome.html?lang=threatdom", 260, 180, 50, -1, -1, 10);
|
tjxstatus = false;
|
} else {
|
window.external.closeDialog("tool");
|
tjxstatus = true;
|
}
|
}
|
|
//通视分析
|
function tsfx() {
|
sgworld.Command.Execute(1046, 0);
|
}
|
|
//图片标签
|
function tpbq() {
|
sgworld.Command.Execute(1012, 1);
|
}
|
|
//文本标签
|
function cjwb() {
|
sgworld.Command.Execute(1012, 0);
|
}
|
|
//工程树
|
var projectTreeStatus = true;
|
|
//createBorderDialog
|
function projectTree() {
|
if (projectTreeStatus) {
|
//sgworld.ProjectTree.ShowSearchTool = false;
|
//window.external.createPmDialogDock('projectTree', url + "tool/ProjectTree.html", 420, 500, 200, 500, -1, -1);
|
window.external.createPmDialogDock('projectTree', url + "tool/ProjectTree.html", 280, 450, 150, 20, -1, -1); //rb.width, rb.height, rb.top, rb.left, rb.bottom, rb.right
|
projectTreeStatus = false;
|
} else {
|
window.external.closeDialog("projectTree");
|
projectTreeStatus = true;
|
}
|
}
|
|
//洪水淹没分析
|
function hsymfx() {
|
sgworld.Command.Execute(1044, 0);
|
}
|