[Mapbender-commits] r2146 - branches/2.4.5/http/classes

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Wed Feb 27 07:49:24 EST 2008


Author: astrid_emde
Date: 2008-02-27 07:49:24 -0500 (Wed, 27 Feb 2008)
New Revision: 2146

Modified:
   branches/2.4.5/http/classes/class_stripRequest.php
Log:
for http://www.mapbender.org/ExportMapimage
new functions added getFormat() and setFormat($formatType)

Modified: branches/2.4.5/http/classes/class_stripRequest.php
===================================================================
--- branches/2.4.5/http/classes/class_stripRequest.php	2008-02-27 12:47:00 UTC (rev 2145)
+++ branches/2.4.5/http/classes/class_stripRequest.php	2008-02-27 12:49:24 UTC (rev 2146)
@@ -80,6 +80,48 @@
 			return $output;
 		}
 	}
+	
+	function getFormat(){
+		$format = $this->get("format");
+			
+		if ($format=="PNG" || $format=="image/png"){
+			return "png";
+		} else if ($format=="JPEG" || $format=="image/jpeg"){
+			return "jpeg";
+		} else {
+			return null;
+		}
+
+	}
+	
+	function setFormat($formatType){
+		$version = $this->get("version");
+		if($version == "1.0.0"){
+			if ($formatType=='png'){
+				$output = $this->set("format","PNG");
+				return $output;	
+			} else if ($formatType=='jpeg'){
+				$output = $this->set("format","JPEG");
+				return $output;	
+			} else {
+				return;
+			}
+			
+		}
+		else{						
+			if ($formatType=='png'){
+				$output = $this->set("format","image/png");
+				return $output;	
+			} else if ($formatType=='jpeg'){
+				$output = $this->set("format","image/jpeg");
+				return $output;	
+			} else {
+				return;
+			}
+			
+		}
+	}
+	
 	function append($param){
 		$this->url .= "&".$param;
 		$this->encodeGET();



More information about the Mapbender_commits mailing list