[Mapbender-commits] r3439 - trunk/mapbender/http/print

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Jan 13 10:40:29 EST 2009


Author: mschulz
Date: 2009-01-13 10:40:29 -0500 (Tue, 13 Jan 2009)
New Revision: 3439

Modified:
   trunk/mapbender/http/print/mod_printPDF.php
Log:
now uses getDOMElement to access mapframe elements. 

Modified: trunk/mapbender/http/print/mod_printPDF.php
===================================================================
--- trunk/mapbender/http/print/mod_printPDF.php	2009-01-13 14:55:28 UTC (rev 3438)
+++ trunk/mapbender/http/print/mod_printPDF.php	2009-01-13 15:40:29 UTC (rev 3439)
@@ -139,6 +139,7 @@
 
 		if(size != "false" && format != "false"){
 			var ind = pt.getMapObjIndexByName(target);
+			var map_el = pt.mb_mapObj[ind].getDomElement();
 			var coord = pt.mb_mapObj[ind].extent.split(",");
 			var centerX = parseFloat(coord[0]) + (parseFloat(coord[2]) - parseFloat(coord[0]))/2
 			var centerY = parseFloat(coord[1]) + (parseFloat(coord[3]) - parseFloat(coord[1]))/2
@@ -189,10 +190,8 @@
 
 			pt.mb_mapObj[ind].width = Math.round(map_width);
 			pt.mb_mapObj[ind].height = Math.round(map_height);
-			pt.document.getElementById(target).style.width = Math.round(map_width);
-			pt.document.getElementById(target).style.height = Math.round(map_height);
-			pt.window.frames[target].document.getElementById("maps").style.width = Math.round(map_width);
-			pt.window.frames[target].document.getElementById("maps").style.height = Math.round(map_height);
+			map_el.style.width = Math.round(map_width);
+			map_el.style.height = Math.round(map_height);
 
 			//pt.setMapRequest(target);
 //			pt.mb_repaintScale(target, null, null, prevscale);
@@ -225,6 +224,7 @@
 		
 		if(size != "" && format != ""){
 			var ind = pt.getMapObjIndexByName(target);
+			var map_el = pt.mb_mapObj[ind].getDomElement();
 			var coord = pt.mb_mapObj[ind].extent.split(",");
 			var centerX = parseFloat(coord[0]) + (parseFloat(coord[2]) - parseFloat(coord[0]))/2
 			var centerY = parseFloat(coord[1]) + (parseFloat(coord[3]) - parseFloat(coord[1]))/2
@@ -234,10 +234,8 @@
 	
 			pt.mb_mapObj[ind].width = Math.round(map_width);
 			pt.mb_mapObj[ind].height = Math.round(map_height);
-			pt.document.getElementById(target).style.width = Math.round(map_width);
-			pt.document.getElementById(target).style.height = Math.round(map_height);
-			pt.window.frames[target].document.getElementById("maps").style.width = Math.round(map_width);
-			pt.window.frames[target].document.getElementById("maps").style.height = Math.round(map_height);
+			map_el.style.width = Math.round(map_width);
+			map_el.style.height = Math.round(map_height);
 	
 			//pt.setMapRequest(target);		
 //			pt.mb_repaintScale(target, null, null, pt.mb_getScale(target));



More information about the Mapbender_commits mailing list