mapstats |
Subversion Repositories: |
Rev 9 | Rev 10 | |
---|---|---|
Line 2... | Line 2... | |
// This script made by JKLIR as. Unreal][ [http://jklir.net] |
// This script made by JKLIR as. Unreal][ [http://jklir.net] | |
// Map engine originally from Emcee Lam [http://sjsutech.com] |
// Map engine originally from Emcee Lam [http://sjsutech.com] | |
// Licence: GNU/GPL |
// Licence: GNU/GPL | Version 4.1 | |
// (c) 2011 All rights reserved |
// (c) 2011 All rights reserved | |
// -------------------------------------------------------- |
// -------------------------------------------------------- | |
|
| |
var mainMap;var magnifier;var node=new Array();var nodecount;var file_nodes=new Array();var file_noping=new Array();var file_links=new Array();var file_infopoints=new Array();var file_state=new Array();var ann;var m1;var m2;var m3;var m4;var m5;var m6;var m7;var m8;var m9;var m1_a;var m2_a;var m3_a;var m4_a;var m5_a;var m6_a;var m7_a;var m8_a;var m9_a;var cntm;var div_paint;var div_points;var div_wave;var div_infopoint;var div_name;var div_ip;var div_status;var numoflinks=0;var maxnumoflinks=17;var is_ie=false;if(typeof(G_vmlCanvasManager)!='undefined'){is_ie=true;} |
| |
actual_links="";var drawing_timer;var is_adding=true;Array.prototype.max=function(){var max=this[0];var len=this.length;for(var i=1;i<len;i++)if(this[i]>max)max=this[i];return max;} |
var mainMap;var magnifier;var node=new Array();var nodecount;var file_nodes=new Array();var file_noping=new Array();var file_links=new Array();var file_infopoints=new Array();var file_state=new Array();var ann,m1,m2,m3,m4,m5,m6,m7,m8,m9;var m1_a,m2_a,m3_a,m4_a,m5_a,m6_a,m7_a,m8_a,m9_a;var cntm;var div_paint,div_points,div_wave,div_infopoint,div_name,div_ip,div_status;var numoflinks=0;var maxnumoflinks=17;var is_ie=false;if(typeof(G_vmlCanvasManager)!='undefined'){is_ie=true;} | |
actual_links="";var drawing_timer;var is_adding=true;var visibleTilesMap=new Array();Array.prototype.max=function(){var max=this[0];var len=this.length;for(var i=1;i<len;i++)if(this[i]>max)max=this[i];return max;} | ||
Array.prototype.min=function(){var min=this[0];var len=this.length;for(var i=1;i<len;i++)if(this[i]<min)min=this[i];return min;} |
Array.prototype.min=function(){var min=this[0];var len=this.length;for(var i=1;i<len;i++)if(this[i]<min)min=this[i];return min;} | |
function mapInit(startzoom){magnifier=new Magnifier();mainMap=new MainMap(startzoom);var miniMapDiv=document.getElementById("miniMapInner");miniMapDiv.onmousedown=function(event){return magnifier.startMove(event)};miniMapDiv.onmousemove=function(event){return magnifier.processMove(event)};miniMapDiv.onmouseup=function(event){return magnifier.stopMove(event)};miniMapDiv.ondragstart=function(){return false;}} |
function mapInit(startzoom){magnifier=new Magnifier();mainMap=new MainMap(startzoom);var miniMapDiv=document.getElementById("miniMapInner");miniMapDiv.onmousedown=function(event){return magnifier.startMove(event)};miniMapDiv.onmousemove=function(event){return magnifier.processMove(event)};miniMapDiv.onmouseup=function(event){return magnifier.stopMove(event)};miniMapDiv.ondragstart=function(){return false;}} | |
function Magnifier(){var this1=this;this.f_dragging=false;this.div=document.getElementById("magnifier");this.div.ondragstart=function(){return false;} |
function Magnifier(){var this1=this;this.f_dragging=false;this.div=document.getElementById("magnifier");this.div.ondragstart=function(){return false;} | |
this.div.onmousedown=function(event){return this1.startMove(event)};this.div.onmousemove=function(event){return this1.processMove(event)};this.div.onmouseup=function(event){return this1.stopMove(event)};} |
this.div.onmousedown=function(event){return this1.startMove(event)};this.div.onmousemove=function(event){return this1.processMove(event)};this.div.onmouseup=function(event){return this1.stopMove(event)};} | |
Magnifier.prototype.startMove=function(event){if(!event)event=window.event;var magnifierDiv=document.getElementById("magnifier");this.dragStartLeft=event.clientX;this.dragStartTop=event.clientY;this.top=magnifierDiv.offsetTop;this.left=magnifierDiv.offsetLeft;this.f_dragging=true;return false;} |
Magnifier.prototype.startMove=function(event){if(!event)event=window.event;var magnifierDiv=document.getElementById("magnifier");this.dragStartLeft=event.clientX;this.dragStartTop=event.clientY;this.top=magnifierDiv.offsetTop;this.left=magnifierDiv.offsetLeft;this.f_dragging=true;return false;} | |
Magnifier.prototype.processMove=function(event){var magnifierDiv=this.div;if(!event)event=window.event;if(this.f_dragging){var minX=0;var maxX=magres_x-magnifierDiv.offsetWidth;var minY=0;var maxY=magres_y-magnifierDiv.offsetHeight;var shiftedLeft=this.left+(event.clientX-this.dragStartLeft);if(shiftedLeft<minX)shiftedLeft=minX;if(shiftedLeft>maxX)shiftedLeft=maxX;magnifierDiv.style.left=shiftedLeft+"px";var shiftedTop=this.top+(event.clientY-this.dragStartTop);if(shiftedTop<minY)shiftedTop=minY;if(shiftedTop>maxY)shiftedTop=maxY;magnifierDiv.style.top=shiftedTop+"px";mainMap.setViewPort();}} |
Magnifier.prototype.processMove=function(event){var magnifierDiv=this.div;if(!event)event=window.event;if(this.f_dragging){var minX=0;var maxX=magres_x-magnifierDiv.offsetWidth;var minY=0;var maxY=magres_y-magnifierDiv.offsetHeight;var shiftedLeft=this.left+(event.clientX-this.dragStartLeft);if(shiftedLeft<minX)shiftedLeft=minX;if(shiftedLeft>maxX)shiftedLeft=maxX;magnifierDiv.style.left=shiftedLeft+"px";var shiftedTop=this.top+(event.clientY-this.dragStartTop);if(shiftedTop<minY)shiftedTop=minY;if(shiftedTop>maxY)shiftedTop=maxY;magnifierDiv.style.top=shiftedTop+"px";mainMap.setViewPort();}} | |
Magnifier.prototype.stopMove=function(event){this.f_dragging=false;is_adding=true;checkLinks();} |
Magnifier.prototype.stopMove=function(event){this.f_dragging=false;is_adding=true;checkLinks();} | |
Magnifier.prototype.setSize=function(innerDivWidth,innerDivHeight){var magnifierWidth=Math.round((magres_x*inres_x)/innerDivWidth)-2;var magnifierHeight=Math.round((magres_y*inres_y)/innerDivHeight)-2;var magnifierDiv=document.getElementById("magnifier");magnifierDiv.style.width=magnifierWidth+"px";magnifierDiv.style.height=magnifierHeight+"px";document.getElementById("wrapper").style.width=inres_x+document.getElementById("menuset").clientWidth+18+"px";} |
Magnifier.prototype.setSize=function(innerDivWidth,innerDivHeight){var magnifierWidth=Math.round((magres_x*inres_x)/innerDivWidth)-2;var magnifierHeight=Math.round((magres_y*inres_y)/innerDivHeight)-2;var magnifierDiv=document.getElementById("magnifier");magnifierDiv.style.width=magnifierWidth+"px";magnifierDiv.style.height=magnifierHeight+"px";document.getElementById("wrapper").style.width=inres_x+document.getElementById("menuset").clientWidth+18+"px";} | |
Magnifier.prototype.setPosition=function(){var innerDiv=document.getElementById("innerDiv");var innerDivWidth=innerDiv.clientWidth;var innerDivHeight=innerDiv.clientHeight;var innerDivLeft=innerDiv.offsetLeft;var innerDivTop=innerDiv.offsetTop;this.left=Math.round(Math.abs(innerDivLeft)*magres_x/innerDivWidth);this.top=Math.round(Math.abs(innerDivTop)*magres_y/innerDivHeight);var magnifierDiv=this.div;magnifierDiv.style.left=this.left+"px";magnifierDiv.style.top=this.top+"px";} |
Magnifier.prototype.setPosition=function(){var innerDiv=document.getElementById("innerDiv");var innerDivWidth=innerDiv.clientWidth;var innerDivHeight=innerDiv.clientHeight;var innerDivLeft=innerDiv.offsetLeft;var innerDivTop=innerDiv.offsetTop;this.left=Math.round(Math.abs(innerDivLeft)*magres_x/innerDivWidth);this.top=Math.round(Math.abs(innerDivTop)*magres_y/innerDivHeight);var magnifierDiv=this.div;magnifierDiv.style.left=this.left+"px";magnifierDiv.style.top=this.top+"px";} | |
function MainMap(zoomfirst){var this1=this;this.viewPortWidth=inres_x;this.viewPortHeight=inres_y;this.tileSize=256;this.f_dragging=false;this.innerDiv=document.getElementById("innerDiv");this.innerDiv.style.cursor="url('grab.cur'), default";var outerDiv=document.getElementById("outerDiv");this.outerDiv=outerDiv;outerDiv.style.width=inres_x+"px";outerDiv.style.height=inres_y+"px";var underMap=document.getElementById("underMap");underMap.style.width=(inres_x-4)+"px";outerDiv.onmousedown=function(event){return this1.startMove(event)};outerDiv.onmousemove=function(event){return this1.processMove(event)};outerDiv.onmouseup=function(event){return this1.stopMove(event)};outerDiv.ondblclick=function(event){return this1.doubleClick()};outerDiv.ondragstart=function(){return false;} |
function MainMap(zoomfirst){var this1=this;this.viewPortWidth=inres_x;this.viewPortHeight=inres_y;this.tileSize=256;this.f_dragging=false;this.innerDiv=document.getElementById("innerDiv");this.innerDiv.style.cursor="url('grab.cur'), default";this.tilesX=Math.ceil(inres_x/this.tileSize)+1;this.tilesY=Math.ceil(inres_y/this.tileSize)+1;var outerDiv=document.getElementById("outerDiv");this.outerDiv=outerDiv;outerDiv.style.width=inres_x+"px";outerDiv.style.height=inres_y+"px";var underMap=document.getElementById("underMap");underMap.style.width=(inres_x-4)+"px";outerDiv.onmousedown=function(event){return this1.startMove(event)};outerDiv.onmousemove=function(event){return this1.processMove(event)};outerDiv.onmouseup=function(event){return this1.stopMove(event)};outerDiv.ondblclick=function(event){return this1.doubleClick()};outerDiv.ondragstart=function(){return false;} | |
if(zoomfirst==eq_mini){zf=0;} |
if(zoomfirst==eq_mini){zf=0;} | |
else if(zoomfirst==eq_medi){zf=1;} |
else if(zoomfirst==eq_medi){zf=1;} | |
else if(zoomfirst==eq_high){zf=2;} |
else if(zoomfirst==eq_high){zf=2;} | |
else if(zoomfirst==eq_orig){zf=3;} |
else if(zoomfirst==eq_orig){zf=3;} | |
else{zf=0;} |
else{zf=0;} | |
this.zoom=zf;this.zoomDim=[{width:parseInt(full_x*eq_mini),height:parseInt(full_y*eq_mini),size:1,nasobek:eq_mini,numoflinks:17},{width:parseInt(full_x*eq_medi),height:parseInt(full_y*eq_medi),size:2,nasobek:eq_medi,numoflinks:12},{width:parseInt(full_x*eq_high),height:parseInt(full_y*eq_high),size:3,nasobek:eq_high,numoflinks:10},{width:parseInt(full_x*eq_orig),height:parseInt(full_y*eq_orig),size:4,nasobek:eq_orig,numoflinks:7},] |
this.zoom=zf;this.zoomDim=[{width:parseInt(full_x*eq_mini),height:parseInt(full_y*eq_mini),size:1,nasobek:eq_mini,numoflinks:17},{width:parseInt(full_x*eq_medi),height:parseInt(full_y*eq_medi),size:2,nasobek:eq_medi,numoflinks:13},{width:parseInt(full_x*eq_high),height:parseInt(full_y*eq_high),size:3,nasobek:eq_high,numoflinks:11},{width:parseInt(full_x*eq_orig),height:parseInt(full_y*eq_orig),size:4,nasobek:eq_orig,numoflinks:8},] | |
var zoomElt=this.zoomDim[this.zoom];this.setInnerDivSize(zoomElt.width,zoomElt.height,zoomElt.size,(parseInt(zoomfirst*1000)/10));document.getElementById("zoom"+this.zoom).className="active";var innerDiv=document.getElementById("innerDiv");innerDiv.style.left=-(start_left*start_mul)+"px";innerDiv.style.top=-(start_top*start_mul)+"px";magnifier.setPosition();this.checkTiles();} |
var zoomElt=this.zoomDim[this.zoom];this.setInnerDivSize(zoomElt.width,zoomElt.height,zoomElt.size,(parseInt(zoomfirst*1000)/10));document.getElementById("zoom"+this.zoom).className="active";var innerDiv=document.getElementById("innerDiv");innerDiv.style.left=-(start_left*start_mul)+"px";innerDiv.style.top=-(start_top*start_mul)+"px";magnifier.setPosition();this.checkTiles();} | |
MainMap.prototype.startMove=function(event){if(!event)event=window.event;this.dragStartLeft=event.clientX;this.dragStartTop=event.clientY;var innerDiv=this.innerDiv;innerDiv.style.cursor="url('grabbing.cur'), default";this.top=innerDiv.offsetTop;this.left=innerDiv.offsetLeft;this.f_dragging=true;is_adding=true;window.clearInterval(drawing_timer);drawing_timer=window.setInterval(checkLinks,1100);return false;} |
MainMap.prototype.startMove=function(event){if(!event)event=window.event;this.dragStartLeft=event.clientX;this.dragStartTop=event.clientY;var innerDiv=this.innerDiv;innerDiv.style.cursor="url('grabbing.cur'), default";this.top=innerDiv.offsetTop;this.left=innerDiv.offsetLeft;this.f_dragging=true;is_adding=true;window.clearInterval(drawing_timer);drawing_timer=window.setInterval(checkLinks,1100);return false;} | |
MainMap.prototype.processMove=function(event){var zoomElt=this.zoomDim[this.zoom];var maxY=0;var minY=-(zoomElt.height-this.viewPortHeight);var maxX=0;var minX=-(zoomElt.width-this.viewPortWidth);if(!event)event=window.event;var innerDiv=this.innerDiv;if(this.f_dragging){var shiftedTop=this.top+(event.clientY-this.dragStartTop);if(shiftedTop>maxY)shiftedTop=maxY;if(shiftedTop<minY)shiftedTop=minY;innerDiv.style.top=shiftedTop+"px";var shiftedLeft=this.left+(event.clientX-this.dragStartLeft);if(shiftedLeft>maxX)shiftedLeft=maxX;if(shiftedLeft<minX)shiftedLeft=minX;innerDiv.style.left=shiftedLeft+"px";this.checkTiles();magnifier.setPosition();} |
MainMap.prototype.processMove=function(event){var zoomElt=this.zoomDim[this.zoom];var maxY=0;var minY=-(zoomElt.height-this.viewPortHeight);var maxX=0;var minX=-(zoomElt.width-this.viewPortWidth);if(!event)event=window.event;var innerDiv=this.innerDiv;if(this.f_dragging){var shiftedTop=this.top+(event.clientY-this.dragStartTop);if(shiftedTop>maxY)shiftedTop=maxY;if(shiftedTop<minY)shiftedTop=minY;innerDiv.style.top=shiftedTop+"px";var shiftedLeft=this.left+(event.clientX-this.dragStartLeft);if(shiftedLeft>maxX)shiftedLeft=maxX;if(shiftedLeft<minX)shiftedLeft=minX;innerDiv.style.left=shiftedLeft+"px";this.checkTiles();magnifier.setPosition();} | |
var konst=0;var nasobek=this.zoomDim[this.zoom].nasobek;if(is_ie){konst=-2;} |
var konst=0;var nasobek=this.zoomDim[this.zoom].nasobek;if(is_ie){konst=-2;} | |
var outerDiv=this.outerDiv;var infoDiv=document.getElementById("infoDiv");if(this.f_dragging){infoDiv.innerHTML=parseInt((Math.abs(shiftedLeft)+event.clientX-outerDiv.offsetLeft+konst)/nasobek)+" x "+parseInt((Math.abs(shiftedTop)+event.clientY-outerDiv.offsetTop+konst)/nasobek);}else{infoDiv.innerHTML=parseInt((Math.abs(parseInt(innerDiv.style.left))+event.clientX-outerDiv.offsetLeft+konst)/nasobek)+" x "+parseInt((Math.abs(parseInt(innerDiv.style.top))+event.clientY-outerDiv.offsetTop+konst)/nasobek);}} |
var outerDiv=this.outerDiv;var infoDiv=document.getElementById("infoDiv");if(this.f_dragging){infoDiv.innerHTML=parseInt((Math.abs(shiftedLeft)+event.clientX-outerDiv.offsetLeft+konst)/nasobek)+" x "+parseInt((Math.abs(shiftedTop)+event.clientY-outerDiv.offsetTop+konst)/nasobek);}else{infoDiv.innerHTML=parseInt((Math.abs(parseInt(innerDiv.style.left))+event.clientX-outerDiv.offsetLeft+konst)/nasobek)+" x "+parseInt((Math.abs(parseInt(innerDiv.style.top))+event.clientY-outerDiv.offsetTop+konst)/nasobek);}} | |
MainMap.prototype.checkZoom=function(){window.clearInterval(drawing_timer);var zoomElt=this.zoomDim[this.zoom];var maxY=0;var minY=-(zoomElt.height-this.viewPortHeight);var maxX=0;var minX=-(zoomElt.width-this.viewPortWidth);var chcky=0;var chckx=0;var innerDiv=this.innerDiv;var shiftedTop=innerDiv.offsetTop;if(shiftedTop>maxY){shiftedTop=maxY;chcky=1;} |
MainMap.prototype.checkZoom=function(){window.clearInterval(drawing_timer);var zoomElt=this.zoomDim[this.zoom];var maxY=0;var minY=-(zoomElt.height-this.viewPortHeight);var maxX=0;var minX=-(zoomElt.width-this.viewPortWidth);var chcky=0;var chckx=0;var innerDiv=this.innerDiv;var shiftedTop=innerDiv.offsetTop;if(shiftedTop>maxY){shiftedTop=maxY;chcky=1;} | |
if(shiftedTop<minY){shiftedTop=minY;chcky=1;} |
if(shiftedTop<minY){shiftedTop=minY;chcky=1;} | |
if(chcky==1)innerDiv.style.top=shiftedTop+"px";var shiftedLeft=innerDiv.offsetLeft;if(shiftedLeft>maxX){shiftedLeft=maxX;chckx=1;} |
if(chcky==1)innerDiv.style.top=shiftedTop+"px";var shiftedLeft=innerDiv.offsetLeft;if(shiftedLeft>maxX){shiftedLeft=maxX;chckx=1;} | |
if(shiftedLeft<minX){shiftedLeft=minX;chckx=1;} |
if(shiftedLeft<minX){shiftedLeft=minX;chckx=1;} | |
if(chckx==1)innerDiv.style.left=shiftedLeft+"px";magnifier.setPosition();document.getElementById("zoom0").className="";document.getElementById("zoom1").className="";document.getElementById("zoom2").className="";document.getElementById("zoom3").className="";document.getElementById("zoom"+this.zoom).className="active";} |
if(chckx==1)innerDiv.style.left=shiftedLeft+"px";magnifier.setPosition();document.getElementById("zoom0").className="";document.getElementById("zoom1").className="";document.getElementById("zoom2").className="";document.getElementById("zoom3").className="";document.getElementById("zoom"+this.zoom).className="active";} | |
MainMap.prototype.checkTiles=function(){var innerDiv=this.innerDiv;var tileSize=this.tileSize;var visibleTiles=this.getVisibleTiles();var visibleTilesMap={};var i;var size=this.zoomDim[this.zoom].size;for(i=0;i<visibleTiles.length;i++){var tile=visibleTiles[i];var xy="x"+tile.x+"y"+tile.y;var tileName=xy+"z"+this.zoom;visibleTilesMap[tileName]=true;var img=document.getElementById(tileName);if(!img){img=document.createElement("img");img.src="size"+size+"/"+xy+".jpg";img.style.position="absolute";img.style.left=(tile.x*tileSize)+"px";img.style.top=(tile.y*tileSize)+"px";img.setAttribute("id",tileName);innerDiv.appendChild(img);}} |
MainMap.prototype.checkTiles=function(){var innerDiv=this.innerDiv;var tileSize=this.tileSize;var visibleTiles=this.getVisibleTiles();var i;var size=this.zoomDim[this.zoom].size;for(i=0;i<visibleTiles.length;i++){var tile=visibleTiles[i];var xy="x"+tile.x+"y"+tile.y;var tileName=xy+"z"+this.zoom;if(!visibleTilesMap[tileName]){var img=document.createElement("img");img.src="size"+size+"/"+xy+".jpg";img.style.position="absolute";img.style.left=(tile.x*tileSize)+"px";img.style.top=(tile.y*tileSize)+"px";img.setAttribute("id",tileName);innerDiv.appendChild(img);visibleTilesMap[tileName]=true;}} | |
var imgs=innerDiv.getElementsByTagName("img");for(i=0;i<imgs.length;i++){var id=imgs[i].getAttribute("id");if(!visibleTilesMap[id]){innerDiv.removeChild(imgs[i]);i--;}}} |
var imgs=innerDiv.getElementsByTagName("img");for(i=0;i<imgs.length;i++){var id=imgs[i].getAttribute("id");if(!visibleTilesMap[id]){innerDiv.removeChild(imgs[i]);}}} | |
MainMap.prototype.getVisibleTiles=function(){var innerDiv=this.innerDiv;var mapX=innerDiv.offsetLeft;var mapY=innerDiv.offsetTop;var tileSize=this.tileSize;var startX=Math.abs(Math.floor(mapX/tileSize))-1;if(startX<0)startX=0;var startY=Math.abs(Math.floor(mapY/tileSize))-1;if(startY<0)startY=0;var tilesX=Math.ceil(this.viewPortWidth/tileSize)+1;var tilesY=Math.ceil(this.viewPortHeight/tileSize)+1;var visibleTiles=[];var counter=0;for(x=startX;x<(tilesX+startX);x++){for(y=startY;y<(tilesY+startY);y++){var tile={};tile.x=x;tile.y=y;visibleTiles[counter++]=tile;}} |
MainMap.prototype.getVisibleTiles=function(){var innerDiv=this.innerDiv;var mapX=innerDiv.offsetLeft;var mapY=innerDiv.offsetTop;var tileSize=this.tileSize;var startX=Math.abs(Math.floor(mapX/tileSize))-1;if(startX<0)startX=0;var startY=Math.abs(Math.floor(mapY/tileSize))-1;if(startY<0)startY=0;var visibleTiles=[];var counter=0;for(x=startX;x<(this.tilesX+startX);x++){for(y=startY;y<(this.tilesY+startY);y++){var tile={};tile.x=x;tile.y=y;visibleTiles[counter++]=tile;}} | |
return visibleTiles;} |
return visibleTiles;} | |
MainMap.prototype.stopMove=function(event){window.clearInterval(drawing_timer);checkLinks();is_adding=false;checkLinks();this.innerDiv.style.cursor="url('grab.cur'), default";this.f_dragging=false;} |
MainMap.prototype.stopMove=function(event){window.clearInterval(drawing_timer);checkLinks();is_adding=false;checkLinks();this.innerDiv.style.cursor="url('grab.cur'), default";this.f_dragging=false;} | |
MainMap.prototype.setViewPort=function(){var magDiv=document.getElementById("magnifier");var innerDiv=this.innerDiv;var magLeft=magDiv.offsetLeft;var magTop=magDiv.offsetTop;var innerDivWidth=innerDiv.clientWidth;var innerDivHeight=innerDiv.clientHeight;var innerDivLeftMin=inres_x-innerDivWidth;var innerDivLeft=Math.round((-magLeft)*innerDivWidth/magres_x);if(innerDivLeft<innerDivLeftMin)innerDivLeft=innerDivLeftMin;innerDiv.style.left=innerDivLeft+"px";var innerDivTopMin=inres_y-innerDivHeight;var innerDivTop=Math.round((-magTop)*innerDivHeight/magres_y);if(innerDivTop<innerDivTopMin)innerDivTop=innerDivTopMin;innerDiv.style.top=innerDivTop+"px";this.checkTiles();} |
MainMap.prototype.setViewPort=function(){var magDiv=document.getElementById("magnifier");var innerDiv=this.innerDiv;var magLeft=magDiv.offsetLeft;var magTop=magDiv.offsetTop;var innerDivWidth=innerDiv.clientWidth;var innerDivHeight=innerDiv.clientHeight;var innerDivLeftMin=inres_x-innerDivWidth;var innerDivLeft=Math.round((-magLeft)*innerDivWidth/magres_x);if(innerDivLeft<innerDivLeftMin)innerDivLeft=innerDivLeftMin;innerDiv.style.left=innerDivLeft+"px";var innerDivTopMin=inres_y-innerDivHeight;var innerDivTop=Math.round((-magTop)*innerDivHeight/magres_y);if(innerDivTop<innerDivTopMin)innerDivTop=innerDivTopMin;innerDiv.style.top=innerDivTop+"px";this.checkTiles();} | |
MainMap.prototype.setInnerDivSize=function(width,height,size,percent){var innerDiv=this.innerDiv;innerDiv.style.width=width+"px";innerDiv.style.height=height+"px";magnifier.setPosition();magnifier.setSize(width,height);var resolutionInfo=document.getElementById("resolutionInfo");resolutionInfo.innerHTML=percent+"%, "+width+" x "+height+"px";} |
MainMap.prototype.setInnerDivSize=function(width,height,size,percent){var innerDiv=this.innerDiv;innerDiv.style.width=width+"px";innerDiv.style.height=height+"px";magnifier.setPosition();magnifier.setSize(width,height);var resolutionInfo=document.getElementById("resolutionInfo");resolutionInfo.innerHTML=percent+"%, "+width+" x "+height+"px";} | |
MainMap.prototype.setZoom=function(newZoom){is_adding=true;if(this.zoom==newZoom)return;window.clearInterval(drawing_timer);actual_links="";numoflinks=0;var oldZ=this.zoomDim[this.zoom];var newZ=this.zoomDim[newZoom];var innerDiv=this.innerDiv;var imgs=innerDiv.getElementsByTagName("img");while(imgs.length>0){innerDiv.removeChild(imgs[0]);} |
MainMap.prototype.setZoom=function(newZoom){is_adding=true;if(this.zoom==newZoom)return;window.clearInterval(drawing_timer);actual_links="";numoflinks=0;var oldZ=this.zoomDim[this.zoom];var newZ=this.zoomDim[newZoom];var innerDiv=this.innerDiv;var imgs=innerDiv.getElementsByTagName("img");while(imgs.length>0){innerDiv.removeChild(imgs[0]);} | |
var oldLeft=innerDiv.offsetLeft;var oldTop=innerDiv.offsetTop;var wdth=Math.round(((magres_x*inres_x)/newZ.width)-2);var hght=Math.round(((magres_y*inres_y)/newZ.height)-2);var wdth2=Math.round(((magres_x*inres_x)/oldZ.width)-2);var hght2=Math.round(((magres_y*inres_y)/oldZ.height)-2);innerDiv.style.left=Math.round(Math.round(newZ.width*oldLeft/oldZ.width)+((wdth-wdth2)*4))+"px";innerDiv.style.top=Math.round(Math.round(newZ.height*oldTop/oldZ.height)+((hght-hght2)*4))+"px";this.zoom=newZoom;this.setInnerDivSize(newZ.width,newZ.height,newZ.size,(newZ.nasobek*1000)/10);maxnumoflinks=newZ.numoflinks;this.checkZoom();this.checkTiles();deleteNames();canvasInit(newZ.nasobek);} |
visibleTilesMap=new Array();var oldLeft=innerDiv.offsetLeft;var oldTop=innerDiv.offsetTop;var wdth=Math.round(((magres_x*inres_x)/newZ.width)-2);var hght=Math.round(((magres_y*inres_y)/newZ.height)-2);var wdth2=Math.round(((magres_x*inres_x)/oldZ.width)-2);var hght2=Math.round(((magres_y*inres_y)/oldZ.height)-2);innerDiv.style.left=Math.round(Math.round(newZ.width*oldLeft/oldZ.width)+((wdth-wdth2)*4))+"px";innerDiv.style.top=Math.round(Math.round(newZ.height*oldTop/oldZ.height)+((hght-hght2)*4))+"px";this.zoom=newZoom;this.setInnerDivSize(newZ.width,newZ.height,newZ.size,(newZ.nasobek*1000)/10);maxnumoflinks=newZ.numoflinks;this.checkZoom();this.checkTiles();deleteNames();canvasInit(newZ.nasobek);} | |
MainMap.prototype.doubleClick=function(){if(this.zoom==3)return;this.setZoom(this.zoom+1);} |
MainMap.prototype.doubleClick=function(){if(this.zoom==3)return;this.setZoom(this.zoom+1);} | |
MainMap.prototype.addNewLinks=function(minx,maxx,miny,maxy,linkname){var innerDiv=this.innerDiv;var frameLeft=-innerDiv.offsetLeft;var frameTop=-innerDiv.offsetTop;var frameRight=frameLeft+inres_x;var frameBottom=frameTop+inres_y;var regexp=new RegExp(linkname+' ','gi');if(!regexp.test(actual_links)){return(minx<=frameRight&&frameLeft<=maxx&&miny<=frameBottom&&frameTop<=maxy);}} |
MainMap.prototype.addNewLinks=function(minx,maxx,miny,maxy,linkname){var innerDiv=this.innerDiv;var frameLeft=-innerDiv.offsetLeft;var frameTop=-innerDiv.offsetTop;var frameRight=frameLeft+inres_x;var frameBottom=frameTop+inres_y;var regexp=new RegExp(linkname+' ','gi');if(!regexp.test(actual_links)){return(minx<=frameRight&&frameLeft<=maxx&&miny<=frameBottom&&frameTop<=maxy);}} | |
MainMap.prototype.removeOldLinks=function(minx,maxx,miny,maxy,linkname){var innerDiv=this.innerDiv;var frameLeft=-innerDiv.offsetLeft;var frameTop=-innerDiv.offsetTop;var frameRight=frameLeft+inres_x;var frameBottom=frameTop+inres_y;var regexp=new RegExp(linkname+' ','gi');if(regexp.test(actual_links)&&numoflinks>=maxnumoflinks){if(!(minx<=frameRight&&frameLeft<=maxx&&miny<=frameBottom&&frameTop<=maxy)){actual_links=actual_links.replace(regexp,"");var linkDOM=document.getElementById(linkname);if(is_ie){linkDOM.parentNode.parentNode.removeChild(linkDOM.parentNode);}else{linkDOM.parentNode.removeChild(linkDOM);} |
MainMap.prototype.removeOldLinks=function(minx,maxx,miny,maxy,linkname){var innerDiv=this.innerDiv;var frameLeft=-innerDiv.offsetLeft;var frameTop=-innerDiv.offsetTop;var frameRight=frameLeft+inres_x;var frameBottom=frameTop+inres_y;var regexp=new RegExp(linkname+' ','gi');if(regexp.test(actual_links)&&numoflinks>=maxnumoflinks){if(!(minx<=frameRight&&frameLeft<=maxx&&miny<=frameBottom&&frameTop<=maxy)){actual_links=actual_links.replace(regexp,"");var linkDOM=document.getElementById(linkname);if(is_ie){linkDOM.parentNode.parentNode.removeChild(linkDOM.parentNode);}else{linkDOM.parentNode.removeChild(linkDOM);} | |
numoflinks--;return;}}} |
numoflinks--;return;}}} | |
function canvasInit(nasobek){is_adding=true;actual_links="";numoflinks=0;div_paint=document.getElementById("paint");div_points=document.getElementById("mapstats_points");div_wave=document.getElementById("mapstats_wave");div_infopoint=document.getElementById("mapstats_infopoint");div_name=document.getElementById("mapstats_name");div_ip=document.getElementById("mapstats_ip");div_status=document.getElementById("mapstats_status");div_paint.style.width=parseInt(full_x*nasobek)+"px";div_paint.style.height=parseInt(full_y*nasobek)+"px";var mapstats_over=document.getElementById("mapstats_over");mapstats_over.style.width=parseInt(full_x*nasobek)+"px";mapstats_over.style.height=parseInt(full_y*nasobek)+"px";ann=nasobek;var pozdrav2=new Array();var pozdr=new Array();var pozdrav=file_nodes.split('\n');var pozdrav1=file_noping.split('\n');var a_cnt=0;var p0count=pozdrav.length;var p1count=pozdrav1.length;for(a=0;a<p0count;a++){if(pozdrav[a]!=false){node[a]=new Array();pozdrav2=pozdrav[a].split(';');for(b=0;b<pozdrav2.length;b++){node[a][b]=pozdrav2[b];} |
function canvasInit(nasobek){is_adding=true;actual_links="";numoflinks=0;div_paint=document.getElementById("paint");div_points=document.getElementById("mapstats_points");div_wave=document.getElementById("mapstats_wave");div_infopoint=document.getElementById("mapstats_infopoint");div_name=document.getElementById("mapstats_name");div_ip=document.getElementById("mapstats_ip");div_status=document.getElementById("mapstats_status");div_paint.style.width=parseInt(full_x*nasobek)+"px";div_paint.style.height=parseInt(full_y*nasobek)+"px";var mapstats_over=document.getElementById("mapstats_over");mapstats_over.style.width=parseInt(full_x*nasobek)+"px";mapstats_over.style.height=parseInt(full_y*nasobek)+"px";ann=nasobek;var pozdrav2=new Array();var pozdr=new Array();var pozdrav=file_nodes.split('\n');var pozdrav1=file_noping.split('\n');var a_cnt=0;var p0count=pozdrav.length;var p1count=pozdrav1.length;for(a=0;a<p0count;a++){if(pozdrav[a]!=false){node[a]=new Array();pozdrav2=pozdrav[a].split(';');for(b=0;b<pozdrav2.length;b++){node[a][b]=pozdrav2[b];} |