[Mapbender-commits] r1708 - trunk/mapbender/http/classes
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Fri Oct 5 07:44:22 EDT 2007
Author: verenadiewald
Date: 2007-10-05 07:44:22 -0400 (Fri, 05 Oct 2007)
New Revision: 1708
Modified:
trunk/mapbender/http/classes/class_wms.php
Log:
handle gui_layer_style, new handling for owsproxy legendurl
Modified: trunk/mapbender/http/classes/class_wms.php
===================================================================
--- trunk/mapbender/http/classes/class_wms.php 2007-10-05 10:51:32 UTC (rev 1707)
+++ trunk/mapbender/http/classes/class_wms.php 2007-10-05 11:44:22 UTC (rev 1708)
@@ -1016,7 +1016,7 @@
$sql .= "gui_layer_status, gui_layer_selectable, gui_layer_visible, gui_layer_queryable, ";
$sql .= "gui_layer_querylayer,gui_layer_minscale,gui_layer_maxscale, gui_layer_priority, gui_layer_style) ";
$sql .= "VALUES($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12)";
- if(count($this->objLayer[$i]->layer_style)==1){
+ if(count($this->objLayer[$i]->layer_style)>0){
$layer_style_name = $this->objLayer[$i]->layer_style[0]["name"];
}
else{
@@ -1038,7 +1038,7 @@
$sql .= "gui_layer_status, gui_layer_selectable, gui_layer_visible, gui_layer_queryable, ";
$sql .= "gui_layer_querylayer,gui_layer_minscale,gui_layer_maxscale, gui_layer_priority, gui_layer_style) ";
$sql .= "VALUES($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12)";
- if(count($this->objLayer[$i]->layer_style)==1){
+ if(count($this->objLayer[$i]->layer_style)>0){
$layer_style_name = $this->objLayer[$i]->layer_style[0]["name"];
}
else{
@@ -1485,20 +1485,24 @@
$this->wms_version = $row2["wms_version"];
$this->wms_title = $this->stripEndlineAndCarriageReturn($row2["wms_title"]);
$this->wms_abstract = $this->stripEndlineAndCarriageReturn($row2["wms_abstract"]);
- if($row2["wms_owsproxy"] != ""){
- $t = OWSPROXY."/".session_id()."/".$row2["wms_owsproxy"]."?";
- $this->wms_getmap = $t;
- $this->wms_getcapabilities = $t;
- $this->wms_getfeatureinfo = $t;
+ $wmsowsproxy = $row2["wms_owsproxy"];
+ #$wmsowsproxy = "test";
+ if($wmsowsproxy != ""){
+ $owsproxyurl = OWSPROXY."/".session_id()."/".$wmsowsproxy."?";
+ $this->wms_getmap = $owsproxyurl;
+ $this->wms_getcapabilities = $owsproxyurl;
+ $this->wms_getfeatureinfo = $owsproxyurl;
+ $this->wms_getlegendurl = $owsproxyurl;
}
else{
$this->wms_getmap = $row2["wms_getmap"];
$this->wms_getcapabilities = $row2["wms_getcapabilities"];
$this->wms_getfeatureinfo = $row2["wms_getfeatureinfo"];
+ $this->wms_getlegendurl = $row2["wms_getlegendurl"];
}
$this->wms_getcapabilities_doc = $row2["wms_getcapabilities_doc"];
- $this->wms_getlegendurl = $row2["wms_getlegendurl"];
$this->wms_filter = $row2["wms_filter"];
+
$count_wms++;
}
@@ -1581,11 +1585,22 @@
while($row2 = db_fetch_array($res_style)){
$this->objLayer[$layer_cnt]->layer_style[$count_layer_style]["name"]=$row2["name"];
$this->objLayer[$layer_cnt]->layer_style[$count_layer_style]["title"]=$row2["title"];
- $this->objLayer[$layer_cnt]->layer_style[$count_layer_style]["legendurl"]=$row2["legendurl"];
+ if($wmsowsproxy != ""){
+ if($row2["legendurl"]!=''){
+ $this->objLayer[$layer_cnt]->layer_style[$count_layer_style]["legendurl"]=$owsproxyurl.
+ "REQUEST=getlegendgraphic&VERSION=".$this->wms_version."&LAYER=".$this->objLayer[$layer_cnt]->layer_name."&FORMAT=".$row2["legendurlformat"].
+ "&STYLE=".$row2["name"];
+ }
+ }
+ else{
+ if($row2["legendurl"]!=''){
+ $this->objLayer[$layer_cnt]->layer_style[$count_layer_style]["legendurl"]=$row2["legendurl"];
+ $e = new mb_exception("legendurl = ".$this->objLayer[$layer_cnt]->layer_style[$count_layer_style]["legendurl"]);
+ }
+ }
$this->objLayer[$layer_cnt]->layer_style[$count_layer_style]["legendurlformat"]=$row2["legendurlformat"];
$count_layer_style++;
}
-
$count++;
}
}
More information about the Mapbender_commits
mailing list