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 "bj":
|
hz(1021, 0);
|
break;
|
case "cx":
|
hz(1023, 0);
|
break;
|
case "czcl":
|
czCl();
|
break;
|
case "dgx":
|
dgXrt();
|
break;
|
case "dysj":
|
hz(1012, 25);
|
break;
|
case "ggptysp":
|
hz(1012, 3);
|
break;
|
case "kjcl":
|
kjCl();
|
break;
|
case "kzhao":
|
kzhao();
|
break;
|
case "lmmj":
|
swLt();
|
break;
|
case "zjljfx":
|
zjljfx();
|
break;
|
case "podu":
|
pDt();
|
break;
|
case "dxtysp":
|
hz(1012, 2);
|
break;
|
case "spcl":
|
spCl();
|
break;
|
case "spmj":
|
spTymj();
|
break;
|
case "yinyfx":
|
yinyfx();
|
break;
|
case "yxdbfx":
|
yxdbfx();
|
break;
|
case "zbqh":
|
zbqh();
|
break;
|
// ------
|
case "fzdx":
|
fzdx();
|
break;
|
case "dlgt":
|
dlgt();
|
break;
|
case "dxgx":
|
dxgx();
|
break;
|
case "dxms":
|
hh();
|
break;
|
case "qtyzl":
|
qtyzl();
|
break;
|
case "hsymfx":
|
hsymfx();
|
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);
|
}
|
});
|
})
|
|
//洪水淹没分析
|
function hsymfx() {
|
sgworld.Command.Execute(1044, 0);
|
}
|
|
var url = window.location.href.substring(0, window.location.href.lastIndexOf('/') + 1);
|
//绘制
|
function hz(command, param) {
|
sgworld.Command.Execute(command, param);
|
}
|
|
//垂直测量
|
function czCl() {
|
sgworld.Command.Execute(1036, 0);
|
}
|
|
//等高线渲染图
|
function dgXrt() {
|
sgworld.Command.Execute(2216, 0);
|
}
|
|
//快照截图
|
function kzhao() {
|
sgworld.Command.Execute(1067, 0);
|
}
|
|
//三维立面面积测量
|
function swLt() {
|
sgworld.Command.Execute(1037, 0);
|
|
}
|
|
//最佳路径分析
|
function zjljfx() {
|
sgworld.Command.Execute(1042, 0);
|
}
|
|
//坡向坡度渲染图
|
function pDt() {
|
sgworld.Command.Execute(2217, 0);
|
}
|
|
//水平测量
|
function spCl() {
|
sgworld.Command.Execute(1034, 0);
|
}
|
|
//水平投影面积
|
function spTymj() {
|
sgworld.Command.Execute(1165, 0);
|
}
|
|
//阴影分析
|
var ystatus = true;
|
|
function yinyfx() {
|
if (!sgworld.Command.IsChecked(2118, 0)) {
|
sgworld.Command.Execute(2118, 0);
|
}
|
if (ystatus) {
|
window.external.createPmDialogDock('tool', url + "tool/ShadowQuery.html?lang=shadow", 300, 280, 50, -1, -1, 10);
|
tjxstatus = false;
|
ystatus = false;
|
} else {
|
window.external.closeDialog("tool");
|
ystatus = true;
|
}
|
}
|
|
//影像对比分析
|
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;
|
}
|
}
|
|
//坐标切换
|
function zbqh() {
|
sgworld.Command.Execute(1020, 0);
|
}
|
|
// -----------------------------
|
|
|
|
//地下模式
|
function hh() {
|
sgworld.Command.Execute(1027, 0);
|
}
|
//墙体与栅栏
|
var qtzlstatus = true;
|
|
function qtyzl() {
|
if (qtzlstatus) {
|
window.external.createPmDialogDock('tool', url + "tool/FenceAndWall.html?lang=wall", 350, 370, 50, -1, -1, 10);
|
qtzlstatus = false;
|
} else {
|
window.external.closeDialog("tool");
|
qtzlstatus = true;
|
}
|
}
|
//地下管线
|
var dxgxstatus = true;
|
|
function dxgx() {
|
if (dxgxstatus) {
|
window.external.createPmDialogDock('tool', url + "tool/CreatePipeLine.html?lang=pipeline", 240, 200, 50, -1, -1, 10);
|
dxgxstatus = false;
|
} else {
|
window.external.closeDialog("tool");
|
dxgxstatus = true;
|
}
|
}
|
|
//电力杆塔
|
var dlgtstatus = true;
|
|
function dlgt() {
|
if (dlgtstatus) {
|
window.external.createPmDialogDock('tool', url + "tool/CreatePowerLine.html?lang=powerline", 320, 320, 50, -1, -1, 10);
|
dlgtstatus = false;
|
} else {
|
window.external.closeDialog("tool");
|
dlgtstatus = true;
|
}
|
}
|
//复制对象
|
var fzdxStatus = true;
|
|
function fzdx() {
|
if (fzdxStatus) {
|
window.external.createPmDialogDock('tool', url + "tool/DuplicateObjects.html?lang=fzdx", 320, 260, 50, -1, -1, 10);
|
fzdxStatus = false;
|
} else {
|
window.external.closeDialog("imgSelect");
|
window.external.closeDialog("tool");
|
fzdxStatus = true;
|
}
|
}
|
|
//土方量计算
|
function spmj() {
|
sgworld.Command.Execute(1165, 0);
|
}
|
|
//地形剖面分析
|
function dxPm() {
|
sgworld.Command.Execute(1149, 0);
|
}
|
|
//地表面积
|
function dbMj() {
|
sgworld.Command.Execute(1165, 0);
|
}
|
|
//坡度分析
|
function pdFx() {
|
sgworld.Command.Execute(2217, 0);
|
}
|
|
//空间距离测量
|
function kjCl() {
|
sgworld.Command.Execute(1035, 0);
|
}
|