[Mapbender-commits] r8169 - in branches/2.7: http/print lib

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Wed Sep 28 07:52:23 EDT 2011


Author: verenadiewald
Date: 2011-09-28 04:52:22 -0700 (Wed, 28 Sep 2011)
New Revision: 8169

Modified:
   branches/2.7/http/print/mod_printPDF.php
   branches/2.7/lib/extent.js
Log:
http://trac.osgeo.org/mapbender/ticket/869

Modified: branches/2.7/http/print/mod_printPDF.php
===================================================================
--- branches/2.7/http/print/mod_printPDF.php	2011-09-23 14:20:04 UTC (rev 8168)
+++ branches/2.7/http/print/mod_printPDF.php	2011-09-28 11:52:22 UTC (rev 8169)
@@ -195,11 +195,15 @@
 			}
 			var pos = pt.makeClickPos2RealWorldPos(target, map_width , map_height);
 			var prevscale= pt.mb_getScale(target);
-			pt.mb_mapObj[ind].extent = new pt.Mapbender.Extent(
-				coord[0],
+			
+                        /** makeExtent is a workaround function to get printPDF functions working if
+                        * printPDF is shown in a popup
+                        */
+			pt.mb_mapObj[ind].extent = pt.Mapbender.makeExtent(
+				parseFloat(coord[0]),
 				pos[1],
 				pos[0],
-				coord[3]
+				parseFloat(coord[3])
 			);
 
 			pt.mb_mapObj[ind].setDimensions(Math.round(map_width), Math.round(map_height));
@@ -247,11 +251,15 @@
 			
 			var pos = pt.makeClickPos2RealWorldPos(target, map_width , map_height);
 			var prevscale= pt.mb_getScale(target);
-			pt.mb_mapObj[ind].extent = new pt.Mapbender.Extent(
-				coord[0],
+                        
+			/** makeExtent is a workaround function to get printPDF functions working if
+                        * printPDF is shown in a popup
+                        */
+			pt.mb_mapObj[ind].extent = pt.Mapbender.makeExtent(
+				parseFloat(coord[0]),
 				pos[1],
 				pos[0],
-				coord[3]
+				parseFloat(coord[3])
 			);
 	
 			pt.mb_mapObj[ind].width = Math.round(map_width);

Modified: branches/2.7/lib/extent.js
===================================================================
--- branches/2.7/lib/extent.js	2011-09-23 14:20:04 UTC (rev 8168)
+++ branches/2.7/lib/extent.js	2011-09-28 11:52:22 UTC (rev 8169)
@@ -14,6 +14,13 @@
  * http://svn.osgeo.org/mapbender/trunk/mapbender/license/license.txt
  */
 
+/** makeExtent is a workaround function to get printPDF functions working if
+ * printPDF is shown in a popup
+ */
+Mapbender.makeExtent = function (minx, miny, maxx, maxy) {
+    return new Mapbender.Extent(minx, miny, maxx, maxy);
+};
+
 /**
  * Constructor: Extent
  * 



More information about the Mapbender_commits mailing list