[Mapbender-commits] r7147 - trunk/mapbender/http/classes
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Wed Nov 24 04:41:52 EST 2010
Author: christoph
Date: 2010-11-24 01:41:52 -0800 (Wed, 24 Nov 2010)
New Revision: 7147
Modified:
trunk/mapbender/http/classes/class_wms.php
Log:
layer styles are not set with correct indices
Modified: trunk/mapbender/http/classes/class_wms.php
===================================================================
--- trunk/mapbender/http/classes/class_wms.php 2010-11-24 08:34:53 UTC (rev 7146)
+++ trunk/mapbender/http/classes/class_wms.php 2010-11-24 09:41:52 UTC (rev 7147)
@@ -140,7 +140,7 @@
private function updateOwsProxyUrl ($url) {
// is OWS proxy URL?
- if (wms::isOwsProxyUrl($url)) {
+ if (self::isOwsProxyUrl($url)) {
// No WMS id could be found
if (!$this->wms_id) {
@@ -151,7 +151,7 @@
$new_proxy_url = $this->replaceSessionIdInOwsProxyUrl($url);
// If new url is a valid proxy URL, return true
- if ($this->isOwsProxyUrl($new_proxy_url)) {
+ if (self::isOwsProxyUrl($new_proxy_url)) {
return $new_proxy_url;
}
else {
@@ -191,6 +191,7 @@
$this->updateOwsProxyUrl($this->wms_getlegendurl);
for ($i = 0; $i < count($this->objLayer); $i++) {
+ new mb_exception(serialize($this->objLayer[$i]->layer_style));
for ($j = 0; $j < count($this->objLayer[$i]->layer_style); $j++) {
$this->objLayer[$i]->layer_style[$j]["legendurl"] =
$this->updateOwsProxyUrl($this->objLayer[$i]->layer_style[$j]["legendurl"]);
@@ -1200,12 +1201,11 @@
// set layer style
//
for ($i = 0; $i < count($currentLayer["style"]); $i++) {
- $layerStyleIndex = count($newLayer->gui_layer_style) - 1;
- $newLayer->layer_style[$layerStyleIndex] = array();
- $newLayer->layer_style[$layerStyleIndex]["name"] = $currentLayer["style"][$i]["name"];
- $newLayer->layer_style[$layerStyleIndex]["title"] = $currentLayer["style"][$i]["title"];
- $newLayer->layer_style[$layerStyleIndex]["legendurl"] = $currentLayer["style"][$i]["legendurl"];
- $newLayer->layer_style[$layerStyleIndex]["legendurl_format"] = $currentLayer["style"][$i]["legendurl_type"];
+ $newLayer->layer_style[$i] = array();
+ $newLayer->layer_style[$i]["name"] = $currentLayer["style"][$i]["name"];
+ $newLayer->layer_style[$i]["title"] = $currentLayer["style"][$i]["title"];
+ $newLayer->layer_style[$i]["legendurl"] = $currentLayer["style"][$i]["legendurl"];
+ $newLayer->layer_style[$i]["legendurl_format"] = $currentLayer["style"][$i]["legendurl_type"];
}
}
More information about the Mapbender_commits
mailing list