[Mapbender-commits] r6154 - trunk/mapbender/http/classes

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon May 10 11:27:28 EDT 2010


Author: christoph
Date: 2010-05-10 11:27:27 -0400 (Mon, 10 May 2010)
New Revision: 6154

Modified:
   trunk/mapbender/http/classes/class_wms.php
Log:
function getLayerById

Modified: trunk/mapbender/http/classes/class_wms.php
===================================================================
--- trunk/mapbender/http/classes/class_wms.php	2010-05-10 14:58:10 UTC (rev 6153)
+++ trunk/mapbender/http/classes/class_wms.php	2010-05-10 15:27:27 UTC (rev 6154)
@@ -224,6 +224,15 @@
 		return "";
 	}
 
+	public function getLayerById ($id) {
+		for ($i = 0; $i < count($this->objLayer); $i++) {
+			if (strval($this->objLayer[$i]->layer_uid) === strval($id)) {
+				return $this->objLayer[$i];
+			}
+		}
+		return null;
+	}
+
 	function createOlObjFromWMS($base){
 	 	if(!$this->wms_title || $this->wms_title == ""){
 			echo "alert('Error: no valid capabilities-document !!');";



More information about the Mapbender_commits mailing list