[Mapbender-commits] r2262 - branches/2.5/http/javascripts
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Tue Mar 18 04:45:02 EDT 2008
Author: nimix
Date: 2008-03-18 04:45:01 -0400 (Tue, 18 Mar 2008)
New Revision: 2262
Modified:
branches/2.5/http/javascripts/map.js
branches/2.5/http/javascripts/map_obj.js
Log:
fix grouped layer bugs
Modified: branches/2.5/http/javascripts/map.js
===================================================================
--- branches/2.5/http/javascripts/map.js 2008-03-17 17:31:43 UTC (rev 2261)
+++ branches/2.5/http/javascripts/map.js 2008-03-18 08:45:01 UTC (rev 2262)
@@ -767,14 +767,16 @@
newMapRequest += newMapURL;
mb_mapObj[i].mapURL[ii] = newMapURL;
mb_mapObj[i].wms[ii].mapURL = newMapURL;
- newMapRequest += "' width='"+mb_mapObj[i].width+"' height='"+mb_mapObj[i].height+"' border='0'></div>";
+ newMapRequest += "' width='"+mb_mapObj[i].width+"' height='"+mb_mapObj[i].height;
+ newMapRequest += "' onError='parent.eventMapRequestFailed.trigger(this);' onAbort='parent.eventMapRequestFailed.trigger(this);' border='0'></div>";
}
else{
mb_mapObj[i].mapURL[ii] = false;
mb_mapObj[i].wms[ii].mapURL = false;
newMapRequest += "<div id='" + myDivId + "' style='position:absolute; top:0px; left:0px; z-index:" + ii + "'>";
newMapRequest += "<img id='"+myMapId+"' name='mapimage' src='" + mb_trans.src;
- newMapRequest += "' width='"+mb_mapObj[i].width+"' height='"+mb_mapObj[i].height+"' border='0'>";
+ newMapRequest += "' width='"+mb_mapObj[i].width+"' height='"+mb_mapObj[i].height;
+ newMapRequest += "' onError='parent.eventMapRequestFailed.trigger(this);' onAbort='parent.eventMapRequestFailed.trigger(this);' border='0'>";
newMapRequest +="</div>";
}
}
@@ -876,13 +878,15 @@
newMapRequest += newMapURL;
mb_mapObj[i].mapURL[ii] = newMapURL;
mb_mapObj[i].wms[ii].mapURL = newMapURL;
- newMapRequest += "' width='"+mb_mapObj[i].width+"' height='"+mb_mapObj[i].height+"' border='0'>";
+ newMapRequest += "' width='"+mb_mapObj[i].width+"' height='"+mb_mapObj[i].height;
+ newMapRequest += "' onError='parent.eventMapRequestFailed.trigger(this);' onAbort='parent.eventMapRequestFailed.trigger(this);' border='0'>";
}
else{
mb_mapObj[i].mapURL[ii] = false;
mb_mapObj[i].wms[ii].mapURL = false;
newMapRequest = "<img id='"+myMapId+"' name='mapimage' src='" + mb_trans.src;
- newMapRequest += "' width='"+mb_mapObj[i].width+"' height='"+mb_mapObj[i].height+"' border='0'>";
+ newMapRequest += "' width='"+mb_mapObj[i].width+"' height='"+mb_mapObj[i].height;
+ newMapRequest += "' onError='parent.eventMapRequestFailed.trigger(this);' onAbort='parent.eventMapRequestFailed.trigger(this);' border='0'>";
}
//prompt("",newMapRequest);
if(mb_log){
@@ -923,10 +927,10 @@
querylayers += mb_mapObj[ind].wms[i].objLayer[ii].layer_name;
cnt_querylayers++;
}
- mb_mapObj[ind].layers[i] = layers;
- mb_mapObj[ind].querylayers[i] = querylayers;
- mb_mapObj[ind].styles[i] = styles;
}
+ mb_mapObj[ind].layers[i] = layers;
+ mb_mapObj[ind].querylayers[i] = querylayers;
+ mb_mapObj[ind].styles[i] = styles;
}
}
}
@@ -946,7 +950,7 @@
if(thisLayer[ii] == myLayername){
if(myMinscale === 0 || thisScale >= myMinscale){minscaleOK = true;}
if(myMaxscale === 0 || thisScale <= myMaxscale){maxscaleOK = true;}
- if(maxscaleOK === true && minscaleOK === true ){
+ if(maxscaleOK === true && minscaleOK === true && !mb_mapObj[mObj].wms[wmsObj].objLayer[i].has_childs){
if(cnt_layer > 0){str_layer += ","; }//str_styles += ","; str_titles += ",";str_parent += ","; str_legendurls += ",";}
str_layer += thisLayer[ii];
cnt_layer++;
@@ -1019,7 +1023,9 @@
else if(path && validation){
newfeatureInfoRequest += requestParams;
try{
- var p = new mb_popup("Feature Info","url:"+path + "?url=" + escape(newfeatureInfoRequest)+"&"+mb_nr,300,400);
+ var p = new mb_popup({title:"Feature Info",
+ url:path+"?url="+escape(newfeatureInfoRequest)+"&"+mb_nr,
+ width:300,height:400,balloon:true,left:x+parseInt(document.getElementById(fName).style.left),top:y+parseInt(document.getElementById(fName).style.top)});
p.show();
}catch(e){
window.open(path + "?url=" + escape(newfeatureInfoRequest)+"&"+mb_nr, "" , "width=300,height=400,scrollbars=yes,resizable=yes");
@@ -1029,8 +1035,12 @@
else if(validation){
newfeatureInfoRequest += requestParams;
try{
- var p = new mb_popup("Feature Info","url:"+newfeatureInfoRequest,300,400);
+ var p = new mb_popup({title:"Feature Info",
+ url:newfeatureInfoRequest,balloon:true,
+ width:300,height:200,left:x+parseInt(document.getElementById(fName).style.left),top:y+parseInt(document.getElementById(fName).style.top)});
p.show();
+ //var p = new mb_popup("Feature Info","url:"+newfeatureInfoRequest,300,400);
+ //p.show();
}
catch(e){
window.open(newfeatureInfoRequest, "" , "width=300,height=400,scrollbars=yes,resizable=yes");
Modified: branches/2.5/http/javascripts/map_obj.js
===================================================================
--- branches/2.5/http/javascripts/map_obj.js 2008-03-17 17:31:43 UTC (rev 2261)
+++ branches/2.5/http/javascripts/map_obj.js 2008-03-18 08:45:01 UTC (rev 2262)
@@ -487,7 +487,7 @@
//Set visibility/queryability of Layer and Sublayers
for(var j = i; j < this.objLayer.length; j++){
- if (i != j && this.objLayer[i].layer_parent == this.objLayer[j].layer_parent) {
+ if (i != j && this.objLayer[i].layer_parent >= this.objLayer[j].layer_parent) {
break;
}
if(type == "visible") {
@@ -509,7 +509,7 @@
else if(type=="querylayer") {
this.objLayer[j].gui_layer_querylayer = state;
}
- }
+ }
}
};
More information about the Mapbender_commits
mailing list