[Mapbender-commits] r8127 - branches/2.7/http/classes
    svn_mapbender at osgeo.org 
    svn_mapbender at osgeo.org
       
    Mon Sep 12 04:35:03 EDT 2011
    
    
  
Author: verenadiewald
Date: 2011-09-12 01:35:03 -0700 (Mon, 12 Sep 2011)
New Revision: 8127
Modified:
   branches/2.7/http/classes/class_wms.php
Log:
if layer name is not set, use layer title for getting the supported srs
Modified: branches/2.7/http/classes/class_wms.php
===================================================================
--- branches/2.7/http/classes/class_wms.php	2011-09-12 08:18:44 UTC (rev 8126)
+++ branches/2.7/http/classes/class_wms.php	2011-09-12 08:35:03 UTC (rev 8127)
@@ -1956,11 +1956,16 @@
 		
 		$layerObject=$wmsCapXml->xpath($xpathLayerName);
 		
-		//for none named layer (only title is set)	
+		//for none named layer (only title is set)
+                if (empty($layerObject)){
+                        $xpathLayerName="//Layer[./Title =\"".$layerName."\"]";
+                    $layerObject=$wmsCapXml->xpath($xpathLayerName);
+                }
+
 		if(!isset($layerObject[0])) {
-			$n = new mb_notice("Layer has no name, didn't get supported srs for layer with id ".$layerId);
-			return false;	
-		}	
+			$n = new mb_notice("Layer has no name and title, BBOX will not be generated for ".$epsg);
+			return false;
+		}
 		
 		$supportedSrsArray = array();
 		
    
    
More information about the Mapbender_commits
mailing list