[Mapbender-commits] r6991 - trunk/mapbender/http/classes
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Fri Oct 1 09:19:13 EDT 2010
Author: christoph
Date: 2010-10-01 13:19:13 +0000 (Fri, 01 Oct 2010)
New Revision: 6991
Modified:
trunk/mapbender/http/classes/class_map.php
Log:
added function to remove WMS
Modified: trunk/mapbender/http/classes/class_map.php
===================================================================
--- trunk/mapbender/http/classes/class_map.php 2010-10-01 13:18:18 UTC (rev 6990)
+++ trunk/mapbender/http/classes/class_map.php 2010-10-01 13:19:13 UTC (rev 6991)
@@ -180,7 +180,21 @@
}
return null;
}
-
+
+ public function removeWms ($indices) {
+ if (!is_array($indices)) {
+ $indices = array($indices);
+ }
+ sort($indices, SORT_NUMERIC);
+ $indices = array_reverse($indices);
+ foreach ($indices as $index) {
+ if ($index >= 0 && $index < count($this->wmsArray)) {
+ array_splice($this->wmsArray, $index, 1);
+ }
+ }
+
+ }
+
/**
*
* @return
More information about the Mapbender_commits
mailing list