[Mapbender-commits] r4026 - branches/dynamic_printframe_dev/print_dynamic

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Wed Jun 17 03:43:29 EDT 2009


Author: christoph
Date: 2009-06-17 03:43:29 -0400 (Wed, 17 Jun 2009)
New Revision: 4026

Modified:
   branches/dynamic_printframe_dev/print_dynamic/mod_printPDF_pdf.php
   branches/dynamic_printframe_dev/print_dynamic/printbox.js
Log:
bug fix by nimix

Modified: branches/dynamic_printframe_dev/print_dynamic/mod_printPDF_pdf.php
===================================================================
--- branches/dynamic_printframe_dev/print_dynamic/mod_printPDF_pdf.php	2009-06-16 08:05:45 UTC (rev 4025)
+++ branches/dynamic_printframe_dev/print_dynamic/mod_printPDF_pdf.php	2009-06-17 07:43:29 UTC (rev 4026)
@@ -383,12 +383,17 @@
 	$coordPattern = "\d+(\.\d+)?";
 	$pattern = "/BBOX=$coordPattern,$coordPattern,$coordPattern,$coordPattern&/";
 	$url = preg_replace($pattern, "BBOX=" . $_REQUEST["coordinates"] . "&", $url);
-
+	
+	// if highquality is choosed multiplicate width and height with mapFactor =4
+	$mapFactor = 1 ;
+	if($factor > 1){
+		$mapFactor = 4 ;
+	}
 	$pattern = "/WIDTH=\d+&/";
-	$url = preg_replace($pattern, "WIDTH=" . $_REQUEST["mapwidth"] . "&", $url);
+	$url = preg_replace($pattern, "WIDTH=" . ($_REQUEST["mapwidth"]*$mapFactor) . "&", $url);
 
 	$pattern = "/HEIGHT=\d+&/";
-	$url = preg_replace($pattern, "HEIGHT=" . $_REQUEST["mapheight"] . "&", $url);
+	$url = preg_replace($pattern, "HEIGHT=" . ($_REQUEST["mapheight"]*$mapFactor) . "&", $url);
 }
 
 $i = new weldMaps2PNG_rotate(implode("___",$array_urls),$filename, $_REQUEST["angle"]);

Modified: branches/dynamic_printframe_dev/print_dynamic/printbox.js
===================================================================
--- branches/dynamic_printframe_dev/print_dynamic/printbox.js	2009-06-16 08:05:45 UTC (rev 4025)
+++ branches/dynamic_printframe_dev/print_dynamic/printbox.js	2009-06-17 07:43:29 UTC (rev 4026)
@@ -620,6 +620,9 @@
 		
 		boxCanvas.setColor(boxColour);	
 		boxCanvas.paint();
+		
+		//Hack to apply opacity also to IE
+		$("#" + canvasName[0]+" div").css({"opacity":opacity});
 	};
 	
 	/**
@@ -630,6 +633,7 @@
 		boxCanvas.clear();
 		activeCanvas.clear();
 		passiveCanvas.clear();
+		$superContainer.remove();
 	};
 
 	var switchActiveCanvas = function () {
@@ -674,10 +678,13 @@
 	$circleCanvas = $("#" + canvasName[3]);
 	$pointCanvas = $("#" + canvasName[1] +  ", #" + canvasName[2]);
 	$boxCanvas = $("#" + canvasName[0]);
-	$boxCanvas.css({
-		"opacity" : opacity, 
-		"filter" : "alpha(opacity=" + (opacity * 100) + ")"
-	});
+	
+    //this won't work because IE does not apply opacity to absolute positioned child divs
+    //see paintBox for workaround
+//	$boxCanvas.css({
+//		"opacity" : opacity,
+//		"filter" : "alpha(opacity=" + (opacity * 100) + ")"
+//	});
 		
 	
 



More information about the Mapbender_commits mailing list