///// Last Update @ 2006-05-26 /////
///// Version: 5.2.1.28508 /////
////////////////////////////////////////////////////////
////// SuperMap IS WebControl Client JavaScript //////
////// For Netscape and Mozilla browser //////
////////////////////////////////////////////////////////
function SetMVIMAGE(mapId)
{
var drawlayerid = mapId +"_drawlayer";
var drawlayer = document.getElementById(drawlayerid);
if(!drawlayer){
drawlayer = document.createElement(drawlayerid);
var worklayer = SMISGetWorkLayer(mapId);
worklayer.appendChild(drawlayer);
drawlayer.style.width =worklayer.style.width;
drawlayer.style.height = worklayer.style.height;
drawlayer.style.left = worklayer.style.left;
drawlayer.style.top = worklayer.style.top;
drawlayer.style.position = "absolute";
drawlayer.style.visibility = "visible";
drawlayer.id = drawlayerid;
var jg = new jsGraphics(drawlayerid);
drawlayer.jg = jg;
}
var map = document.getElementById(mapId +"_MVIMAGE");
var mapcontrol = document.getElementById(mapId);
mapcontrol.removeChild(map);
mapcontrol.appendChild(map);
}
function SplitX(PointsValue, offsetX)
{
if(typeof(offsetX) =="undefined"){offsetX = 0;}
var Xpoints = new Array();
var ArrPoints = PointsValue.split(",");
for(var i=0; i<ArrPoints.length/2; i++){
Xpoints[i] = parseInt(ArrPoints[2*i])+offsetX;
}
return Xpoints;
}
function SplitY(PointsValue,offsetY )
{
if(typeof(offsetY) =="undefined"){offsetY = 0;}
var Ypoints = new Array();
var ArrPoints = PointsValue.split(",");
for(var i=0; i<ArrPoints.length/2; i++){
Ypoints[i] =parseInt(ArrPoints[2*i+1])+offsetY;
}
return Ypoints;
}
// 获取 map image 对象. //
function SMISGetMap(mapId)
{
var _map = document.getElementById(mapId +"_MVIMAGE");
if(!_map) _map = document.getElementById(mapId);
if(!_map) return null;
if(!_map.mapId){ _map.mapId = mapId; }
return _map;
}
function Map_DoCallback(methodName, methodParameters)
{
showBusyFlag(this.mapId);
// "PAN|33&33"
var argument = methodName + "|" + methodParameters;
WebForm_DoCallback(this.mapId, argument, MapControl_Callback, null, null, false);
}
// Action
function SMISActionStart(mapID, action)
{
var editLineId = "SMISEditLine";
var line = document.getElementById(editLineId);
if(line){
document.forms[0].removeChild(line);
}
mapID = mapID.replace("_MVIMAGE", "");
var _map = SMISGetMap(mapID);
if(!BeforeActionStart(_map)){ return; }
// 用于解决在 MyIE2 中出现的 ActionStart 之后,地图图片消失的异常bug。 //
//var v = _map.style.visibility;
//_map.CurrentAction = "";
eval(mapID + "_SMISMapActionStart(_map, action)");
//_map.style.visibility = v;
AfterActionStarted(_map);
_map.DoCallback = Map_DoCallback;
}
function SMISMapActionStop(map)
{
if(!BeforeActionStop(map)){ return; }
map.onmousedown = null;
map.onmousemove = null;
map.onmouseup = null;
map.onclick = null;
map.ondblclick = null;
map.style.cursor = "";
map.bActionStarted = false;
AfterActionStopped(map);
}
//***************************** Mouse Event ********************************
function SMISOnMouseDown(evt)
{alert("2_1");
this.bActionStarted = true;
var relativePos = SMISGetMouseMapRelativePosition(evt,this.map?this.map:this);
this.PointsParam.AddPoint(relativePos.x, relativePos.y);
return false;
}
function SMISPanOnMouseDown(evt)
{alert("2_2");
this.bActionStarted = true;
// hide the customLayer. --ahnan 2004-07-08
var customLayerID = this.id.replace("_MVIMAGE","") + "_divCustomLayer";
var customLayer = document.getElementById(customLayerID);
if (customLayer){ customLayer.style.visibility = "hidden";}
//hide the custompolygon --wangsui 2006-12-04
var idValue=this.id.replace("_MVIMAGE","")+"_idValue";
if(document.getElementById(idValue))
{
var id=document.getElementById(idValue).value.split("&");
for(var i=0;i<id.length;i++)
{
var line=document.getElementById(id[i]);
if(line){line.style.visibility="hidden";}
}
}
var relativePos = SMISGetMouseMapRelativePosition(evt,this.map?this.map:this);
this.PointsParam.AddPoint(relativePos.x, relativePos.y);
window.status = this.PointsParam.GeneratePointsString();
// set to absolute
//this.style.position = "absolute";
return false;
}
function SMISOnMouseUp(evt)
{alert("2_3");
var map = this;
if(this.map){map = this.map;}
if(!this.bActionStarted){return;}
SMISMapActionStop(map);
var relativePos = SMISGetMouseMapRelativePosition(evt,map);
this.PointsParam.AddPoint(relativePos.x, relativePos.y);
var theform = document.forms[0];
SMISCreateHiddenField(theform, map.id + "_Action", map.id + "_Action", map.CurrentAction);
var pointsString = this.PointsParam.GeneratePointsString();
SMISCreateHiddenField(theform, map.id + "_PointsParam", map.id + "_PointsParam",pointsString);
// debug script callback. --ahnan 2005-06-15
map.DoPostBack();
this.bActionStarted = false;
return;
var startPoint = this.PointsParam.GetPoint(0);
var argument = "";
var params = "";
switch(map.CurrentAction){
case "PAN" :
argument = "PanByPixel";
var offsetX = relativePos.x - startPoint.x;
var offsetY = relativePos.y - startPoint.y;
params = offsetX + "&" + offsetY;
break;
case "ZOOMIN" :
argument = "ZoomIn";
params = startPoint.x + "&" + startPoint.y + "&" + relativePos.x + "&" + relativePos.y;
SMISRemoveRect(map);
break;
case "ZOOMOUT" :
argument = "ZoomOut";
params = startPoint.x + "&" + startPoint.y + "&" + relativePos.x + "&" + relativePos.y;
SMISRemoveRect(map);
break;
default:
map.DoPostBack();
return;
break;
}
map.DoCallback(argument, params);
while(this.PointsParam.Points.length > 0){
this.PointsParam.Points.pop();
}
SMISCreateHiddenField(theform, map.id + "_Action", map.id + "_Action", "");
SMISCreateHiddenField(theform, map.id + "_PointsParam", map.id + "_PointsParam", "");
SMISActionStart(evt,map.id, map.CurrentAction);
}
function SMISCircleOnMouseUp(evt)
{alert("2_4");
if(!this.bActionStarted){return;}
var posEnd = SMISGetMouseMapRelativePosition(evt,this.map?this.map:this);
SMISMapActionStop(this);
this.PointsParam.AddPoint(posEnd.x, posEnd.y);
var theform = document.forms[0];
SMISCreateHiddenField(theform, this.id + "_Action", this.id + "_Action", this.CurrentAction);
var pointsString = this.PointsParam.GeneratePointsString();
SMISCreateHiddenField(theform, this.id + "_PointsParam", this.id + "_PointsParam",pointsString);
this.DoPostBack();
}
function SMISRectOnMouseMove(evt)
{
if(!this.bActionStarted){return false;}
var startPoint = this.PointsParam.GetPoint(0);
if(startPoint){
startPoint.x += this.origin.x;
startPoint.y += this.origin.y;
}
if((evt.button == 0|evt.button ==65535) && startPoint != null){
var absolutePos = SMISGetMouseAbsolutePosition(evt);
SMISDrawingRect(this, startPoint, absolutePos);
}
return false;
}
//must return false ,otherwise mouseup event will not be invoked
function SMISPanOnMouseMove(evt)
{
if(!this.bActionStarted){return false;}
var startPoint = this.PointsParam.GetPoint(0);
if(startPoint){
startPoint.x += this.origin.x;
startPoint.y += this.origin.y;
}
//if(evt.button == 0 && startPoint != null)先设为65535,不知道为什么会变成65535
if((evt.button == 0|evt.button ==65535) && startPoint != null){
var absolutePos = SMISGetMouseAbsolutePosition(evt);
if(!SMISCheckMousePosition(evt,this)){
return false;
}
SMISPaningImage(this,startPoint,absolutePos);
}
return false;
}
//must return false ,otherwise mouseup event will not be invoked
function SMISCircleOnMouseMove(evt)
{
if(!this.bActionStart
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
Gis.rar_CSharp 管理系统_GIS系统_基站管理系统_尺_比例尺 (531个子文件)
MainWebForm new.aspx 86KB
MainWebForm.aspx 68KB
ConditionWebForm.aspx 6KB
PrintMainWebForm.aspx 4KB
Default2.aspx 3KB
Default4.aspx 3KB
Default4.aspx 3KB
Default3.aspx 2KB
print.aspx 1KB
MeasureWebForm.aspx 1KB
PrintMapWebForm.aspx 691B
Default.aspx 507B
user.bmp 822B
computer.bmp 822B
plus.bmp 450B
minus.bmp 450B
MainWebForm new.aspx.cs 92KB
MainWebForm.aspx.cs 76KB
PrintMainWebForm.aspx.cs 11KB
PrintMapWebForm.aspx.cs 8KB
Default2.aspx.cs 2KB
Default3.aspx.cs 2KB
Default.aspx.cs 1KB
print.aspx.cs 1KB
Default4.aspx.cs 921B
Default4.aspx.cs 921B
ConditionWebForm.aspx.cs 421B
MeasureWebForm.aspx.cs 419B
RightMenu.css 311B
Button.css 60B
LayerControl.css 42B
page.css 30B
PageTable.css 14B
cur_CIRCLEQUERY.cur 2KB
cur_POLYGONQUERY.cur 2KB
cur_RECTQUERY.cur 2KB
cur_POINTQUERY.cur 2KB
cur_MEASUREDIS.cur 2KB
cur_MEASUREAREA.cur 2KB
cur_ZoomOut.cur 326B
cur_Pan.cur 326B
cur_ZoomIn.cur 326B
Thumbs.db 446KB
Thumbs.db 152KB
design_05.gif 134KB
is_05.gif 58KB
loginbg.gif 43KB
tou.gif 26KB
head_bg.gif 19KB
design_02.gif 19KB
is_01.gif 19KB
is_01_EN.gif 17KB
wait.gif 16KB
topleft.gif 13KB
top01.gif 13KB
1_05.gif 12KB
is_15.gif 11KB
is_15_EN.gif 10KB
design_15.GIF 10KB
wait_EN.gif 10KB
is_02.gif 9KB
toolbar03.gif 6KB
shadow.gif 4KB
design_03.gif 4KB
design_11.gif 4KB
1_18.gif 4KB
2233_16.gif 4KB
design_04.gif 4KB
biaoqian02.gif 4KB
right03.gif 3KB
right06.gif 3KB
biaoqian01.gif 3KB
right05.gif 3KB
is_10.gif 3KB
rightb04.gif 3KB
design_06.gif 3KB
is_08.gif 3KB
121_38.gif 2KB
hos.gif 2KB
righta01.gif 2KB
121_28.gif 2KB
design_10.gif 2KB
121_27.gif 2KB
MVBottom.gif 2KB
right04.gif 2KB
design_08.gif 2KB
dingwei02.gif 2KB
MVLeft.gif 2KB
rollingbar.gif 2KB
Rolling.gif 2KB
right01.gif 2KB
btn04.gif 2KB
121_57.gif 2KB
hotballold.gif 2KB
121_53.gif 2KB
leftc01.gif 2KB
design_12_EN.gif 2KB
design_12.gif 2KB
lefta01.gif 2KB
ToolboxTab_bg.gif 2KB
共 531 条
- 1
- 2
- 3
- 4
- 5
- 6
资源评论
四散
- 粉丝: 52
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功