[Mapbender-commits] r8250 - branches/2.7/http/php

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Feb 13 11:52:20 EST 2012


Author: astrid_emde
Date: 2012-02-13 08:52:20 -0800 (Mon, 13 Feb 2012)
New Revision: 8250

Modified:
   branches/2.7/http/php/mod_changeEPSG_server.php
Log:
WMS 1.3.0: workaround to handle CRS:84 -> pretend it is 4326 switched

Modified: branches/2.7/http/php/mod_changeEPSG_server.php
===================================================================
--- branches/2.7/http/php/mod_changeEPSG_server.php	2012-02-13 16:51:03 UTC (rev 8249)
+++ branches/2.7/http/php/mod_changeEPSG_server.php	2012-02-13 16:52:20 UTC (rev 8250)
@@ -40,7 +40,11 @@
 			$currentEpsg = $epsgArray[$i];
 	
 			$oldEPSG = preg_replace("/EPSG:/","", $currentEpsg->epsg);
+			$oldEPSG = preg_replace("/CRS:/","", $oldEPSG);
+			if ($oldEPSG == '84'){$oldEPSG = '4326';}
 			$newEPSG = preg_replace("/EPSG:/","", $newSrs);
+			$newEPSG = preg_replace("/CRS:/","", $newEPSG);
+			if ($newEPSG == '84'){$newEPSG = '4326';}
 			 
 			$extArray = explode(",", $currentEpsg->extent);
 			if (is_numeric($extArray[0]) && is_numeric($extArray[1]) && 
@@ -68,7 +72,7 @@
 				if ($currentEpsg->frameName) {
 					if (!$resMinx || !$resMiny || !$resMaxx || !$resMaxy) {
 						$ajaxResponse->setSuccess(false);
-						$ajaxResponse->setMessage(_mb("The coordinates could not be projected."));
+						$ajaxResponse->setMessage($oldEPSG."<-->".$newEPSG._mb("The coordinates could not be projected."));
 						$ajaxResponse->send();
 					}
 				}



More information about the Mapbender_commits mailing list