[Mapbender-commits] r1777 - trunk/mapbender/http/php
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Tue Oct 30 05:49:56 EDT 2007
Author: verenadiewald
Date: 2007-10-30 05:49:56 -0400 (Tue, 30 Oct 2007)
New Revision: 1777
Modified:
trunk/mapbender/http/php/mod_editGuiWms.php
Log:
added style handling for each layer
Modified: trunk/mapbender/http/php/mod_editGuiWms.php
===================================================================
--- trunk/mapbender/http/php/mod_editGuiWms.php 2007-10-29 16:01:09 UTC (rev 1776)
+++ trunk/mapbender/http/php/mod_editGuiWms.php 2007-10-30 09:49:56 UTC (rev 1777)
@@ -19,6 +19,7 @@
session_start();
require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+require_once(dirname(__FILE__)."/../classes/class_mb_exception.php");
$con = db_connect(DBSERVER,OWNER,PW);
db_select_db(DB,$con);
import_request_variables("PG");
@@ -426,6 +427,7 @@
$gui_layer_minscale = array();
$gui_layer_maxscale = array();
$gui_layer_priority = array();
+$gui_layer_style = array();
$gui_layer_wfs_featuretype = array();
$layer_id = array();
$layer_parent = array();
@@ -443,6 +445,7 @@
array_push($gui_layer_minscale, $row["gui_layer_minscale"]);
array_push($gui_layer_maxscale, $row["gui_layer_maxscale"]);
array_push($gui_layer_priority, $row["gui_layer_priority"]);
+ array_push($gui_layer_style, $row["gui_layer_style"]);
array_push($gui_layer_wfs_featuretype, $row["gui_layer_wfs_featuretype"]);
array_push($layer_id, $row["layer_id"]);
array_push($layer_parent, $row["layer_parent"]);
@@ -462,7 +465,8 @@
while($row = db_fetch_array($res_le)){
$epsg[$cnt_le] = $row["epsg"];
$cnt_le++;
- }
+}
+
echo "<div style='position:absolute;left:590px; top:180px;' ><input type='button' style='width:100px;height:100px;background-color:#0066cc' value='save' onclick='checkBoxValue()'></div>";
echo "<table class='table_top'>";
@@ -572,6 +576,7 @@
echo "<td>" . toImage('info_default') . "</td>";
echo "<td>" . toImage('minScale 1:') . "</td>";
echo "<td>" . toImage('maxScale 1:') . "</td>";
+ echo "<td>" . toImage('Style') . "</td>";
echo "<td>" . toImage('Prio') . "</td>";
echo "<td>" . toImage('setWFS') . "</td>";
echo "</tr>";
@@ -586,7 +591,21 @@
echo "<nobr><input type='button' class='button_on_off' value='off' onclick='setLayer(\"querylayer\",false)'> ";
echo "<input type='button' class='button_on_off' value='on' onclick='setLayer(\"querylayer\",true)'></nobr>";
echo "</td><td></td><td></td><td></td></tr>";
+
for($i=0; $i<count($layer_id); $i++){
+
+#layer_styles
+$sql_styles = "SELECT * FROM layer_style WHERE fkey_layer_id = $1";
+$v = array($layer_id[$i]);
+$t = array('i');
+$res_styles = db_prep_query($sql_styles,$v,$t);
+$cnt_styles= 0;
+$style = array();
+while($row = db_fetch_array($res_styles)){
+ $style[$cnt_styles] = $row["name"];
+ $cnt_styles++;
+}
+
echo "<tr align='center'>";
echo "<td><input type='text' size='1' name='L_".$layer_id[$i]."___layer_nr' disabled value='".$i."'></td>";
echo "<td style='background:lightgrey'><input type='text' size='2' name='L_".$layer_id[$i]."___layer_id' value='".$layer_id[$i]."' readonly></td>";
@@ -618,7 +637,21 @@
echo "<td><input name='L_".$layer_id[$i]."___gui_layer_minscale' type='text' size='5' value='".$gui_layer_minscale[$i]."'></td>";
echo "<td style='background:lightgrey'><input name='L_".$layer_id[$i]."___gui_layer_maxscale' type='text' size='5' value='".$gui_layer_maxscale[$i]."'></td>";
+
/**/
+ echo "<td>\n";
+ echo "<select class='mySelect' name='L_".$layer_id[$i]."___gui_layer_style'>\n";
+ echo "<option value=''";
+ if(count($style) ==0){ echo "selected";}
+ echo ">---</option>\n";
+ for($j=0;$j<count($style); $j++){
+ echo "<option value='".$style[$j]."'";
+ if($style[$j] == $gui_layer_style[$i]){ echo "selected";}
+ echo ">".$style[$j]."</option>\n";
+ }
+ echo "</select></td>\n";
+
+ /**/
echo "<td><select class='select_short' name='L_".$layer_id[$i]."___gui_layer_priority'>";
for($j=0; $j<count($gui_layer_priority); $j++){
echo "<option value='".$j."'";
More information about the Mapbender_commits
mailing list