[Mapbender-commits] r1692 - trunk/mapbender/http/classes
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Fri Sep 28 06:24:28 EDT 2007
Author: verenadiewald
Date: 2007-09-28 06:24:28 -0400 (Fri, 28 Sep 2007)
New Revision: 1692
Modified:
trunk/mapbender/http/classes/class_wms.php
Log:
handle gui_layer_style
Modified: trunk/mapbender/http/classes/class_wms.php
===================================================================
--- trunk/mapbender/http/classes/class_wms.php 2007-09-26 13:39:38 UTC (rev 1691)
+++ trunk/mapbender/http/classes/class_wms.php 2007-09-28 10:24:28 UTC (rev 1692)
@@ -699,7 +699,8 @@
$this->objLayer[$i]->layer_maxscale ."','".
$this->objLayer[$i]->layer_metadataurl ."','".
$this->objLayer[$i]->gui_layer_wms_id ."','".
- $this->objLayer[$i]->gui_layer_status ."','".
+ $this->objLayer[$i]->gui_layer_status ."','".
+ $this->objLayer[$i]->gui_layer_style ."','".
$this->objLayer[$i]->gui_layer_selectable ."','".
$this->objLayer[$i]->gui_layer_visible ."','".
$this->objLayer[$i]->gui_layer_queryable ."','".
@@ -788,7 +789,8 @@
$this->objLayer[$i]->layer_maxscale ."','".
$this->objLayer[$i]->layer_metadataurl ."','".
$this->objLayer[$i]->gui_layer_wms_id ."','".
- $this->objLayer[$i]->gui_layer_status ."','".
+ $this->objLayer[$i]->gui_layer_status ."','".
+ $this->objLayer[$i]->gui_layer_style ."','".
$this->objLayer[$i]->gui_layer_selectable ."','".
$this->objLayer[$i]->gui_layer_visible ."','".
$this->objLayer[$i]->gui_layer_queryable ."','".
@@ -1012,12 +1014,19 @@
$sql = "INSERT INTO gui_layer (fkey_gui_id, fkey_layer_id, gui_layer_wms_id, ";
$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) ";
- $sql .= "VALUES($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11)";
+ $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){
+ $layer_style_name = $this->objLayer[$i]->layer_style[0]["name"];
+ }
+ else{
+ $layer_style_name = NULL;
+ }
$v = array($gui_id,$this->objLayer[$i]->db_id,$myWMS,1,1,1,$this->objLayer[$i]->layer_queryable,
- $this->objLayer[$i]->layer_queryable,$this->objLayer[$i]->layer_minscale,$this->objLayer[$i]->layer_maxscale,$i);
- $t = array('s','i','i','i','i','i','i','i','i','i','i');
+ $this->objLayer[$i]->layer_queryable,$this->objLayer[$i]->layer_minscale,$this->objLayer[$i]->layer_maxscale,$i,$layer_style_name);
+ $t = array('s','i','i','i','i','i','i','i','i','i','i','s');
$res = db_prep_query($sql,$v,$t);
+ #$e = new mb_exception("name des insert styles und fkey_layer_id: ".$layer_style_name." --- ".$this->objLayer[$i]->db_id);
if(!$res){
////db_rollback();
}
@@ -1027,11 +1036,17 @@
$sql = "INSERT INTO gui_layer (fkey_gui_id, fkey_layer_id, gui_layer_wms_id, ";
$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) ";
- $sql .= "VALUES($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11)";
+ $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){
+ $layer_style_name = $this->objLayer[$i]->layer_style[0]["name"];
+ }
+ else{
+ $layer_style_name = NULL;
+ }
$v = array($gui_id,$this->objLayer[$i]->db_id,$myWMS,0,0,0,$this->objLayer[$i]->layer_queryable,
- $this->objLayer[$i]->layer_queryable,$this->objLayer[$i]->layer_minscale,$this->objLayer[$i]->layer_maxscale,$i);
- $t = array('s','i','i','i','i','i','i','i','i','i','i');
+ $this->objLayer[$i]->layer_queryable,$this->objLayer[$i]->layer_minscale,$this->objLayer[$i]->layer_maxscale,$i,$layer_style_name);
+ $t = array('s','i','i','i','i','i','i','i','i','i','i','s');
$res = db_prep_query($sql,$v,$t);
if(!$res){
////db_rollback();
@@ -1539,6 +1554,7 @@
$this->objLayer[$layer_cnt]->gui_layer_querylayer = $row["gui_layer_querylayer"];
$this->objLayer[$layer_cnt]->gui_layer_minscale = $row["gui_layer_minscale"];
$this->objLayer[$layer_cnt]->gui_layer_maxscale = $row["gui_layer_maxscale"];
+ $this->objLayer[$layer_cnt]->gui_layer_style = $row["gui_layer_style"];
$this->objLayer[$layer_cnt]->gui_layer_wfs_featuretype = $row["gui_layer_wfs_featuretype"];
$sql = "Select * from layer_epsg where fkey_layer_id = $1 ORDER BY fkey_layer_id";
@@ -1668,7 +1684,8 @@
var $gui_layer_selectable = 1;
var $gui_layer_visible = 0;
var $gui_layer_queryable = 0;
- var $gui_layer_querylayer = 0;
+ var $gui_layer_querylayer = 0;
+ var $gui_layer_style = NULL;
function layer($id,$parent){
$this->layer_id = $id;
More information about the Mapbender_commits
mailing list