[Mapbender-commits] r4364 - trunk/mapbender/http/html

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Thu Jul 16 09:43:06 EDT 2009


Author: christoph
Date: 2009-07-16 09:43:06 -0400 (Thu, 16 Jul 2009)
New Revision: 4364

Modified:
   trunk/mapbender/http/html/mod_treefolderPlain.php
Log:
no longer uses deprecated function

fix: check if map image is complete failed, if map is not requested in the first place

Modified: trunk/mapbender/http/html/mod_treefolderPlain.php
===================================================================
--- trunk/mapbender/http/html/mod_treefolderPlain.php	2009-07-16 13:41:30 UTC (rev 4363)
+++ trunk/mapbender/http/html/mod_treefolderPlain.php	2009-07-16 13:43:06 UTC (rev 4364)
@@ -205,7 +205,7 @@
 	if(!initialized)return;
 	myMapObj = getMapObjByName(mod_treeGDE_map);
 	if(myMapObj){
-		var scale = parseInt( mb_getScale(mod_treeGDE_map));
+		var scale = parseInt( myMapObj.getScale());
 		for(var ii=0; ii< myMapObj.wms.length; ii++){
 			for(var iii=1; iii< myMapObj.wms[ii].objLayer.length; iii++){
 				if(scale < parseInt( myMapObj.wms[ii].objLayer[iii].gui_layer_minscale) && parseInt( myMapObj.wms[ii].objLayer[iii].gui_layer_minscale) != 0){                    
@@ -234,8 +234,9 @@
 function updateCheckState(){
 	if(!initialized||lock_check)return;
 	lock_check=true;
+	var map = getMapObjByName(mod_treeGDE_map);
 	for(var i=0; i< mb_mapObj.length; i++){
-		var scale = parseInt( mb_getScale(mod_treeGDE_map));
+		var scale = parseInt( map.getScale());
 		if( mb_mapObj[i].elementName == mod_treeGDE_map){
 			for(var ii=0; ii< mb_mapObj[i].wms.length; ii++){
 				for(var iii=1; iii< mb_mapObj[i].wms[ii].objLayer.length; iii++){
@@ -316,7 +317,10 @@
 
 function checkComplete(wms, map, img, first){
 	var ind= getMapObjIndexByName(mod_treeGDE_map);
-	if( mb_mapObj[ind].wms[wms].mapURL == false ||  mb_mapObj[ind].getDomElement().ownerDocument.getElementById(map).complete){
+	if (mb_mapObj[ind].wms[wms].mapURL == false || 
+		!mb_mapObj[ind].getDomElement().ownerDocument.getElementById(map) ||
+		mb_mapObj[ind].getDomElement().ownerDocument.getElementById(map).complete) {
+		
 		if(state[wms]!=-1){
 			for(var i=1;i< mb_mapObj[ind].wms[wms].objLayer.length;i++){
 				if( mb_mapObj[ind].wms[wms].objLayer[i].gui_layer_visible==1){



More information about the Mapbender_commits mailing list