[Mapbender-commits] r2571 - trunk/mapbender/http/javascripts
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Tue Jul 1 06:18:52 EDT 2008
Author: verenadiewald
Date: 2008-07-01 06:18:52 -0400 (Tue, 01 Jul 2008)
New Revision: 2571
Modified:
trunk/mapbender/http/javascripts/mod_addWMSfromList.php
trunk/mapbender/http/javascripts/mod_addWMSfromfilteredList_ajax.php
Log:
add WMS using function createObjFromDBNoGui in class_wms.php to make sure that owsproxy is used when set
Modified: trunk/mapbender/http/javascripts/mod_addWMSfromList.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_addWMSfromList.php 2008-07-01 10:11:13 UTC (rev 2570)
+++ trunk/mapbender/http/javascripts/mod_addWMSfromList.php 2008-07-01 10:18:52 UTC (rev 2571)
@@ -53,6 +53,10 @@
}
}
+function mod_addWMSfromDB(gui_id, wms_id) {
+ window.opener.mod_addWMSById_load(gui_id, wms_id);
+}
+
// -->
</script>
@@ -145,7 +149,7 @@
/*get allocated wms from allocated gui ********************************************************************************************/
/*get allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/
-$sql_wms = "SELECT DISTINCT wms_title, wms_abstract, wms_getcapabilities,wms_version FROM wms WHERE wms_id IN (";
+$sql_wms = "SELECT DISTINCT wms_id, wms_title, wms_abstract, wms_getcapabilities,wms_version FROM wms WHERE wms_id IN (";
$v = $fkey_wms_id;
$t = array();
for ($i = 1; $i <= count($fkey_wms_id); $i++){
@@ -160,6 +164,7 @@
$res_wms = db_prep_query($sql_wms, $v, $t);
while($row = db_fetch_array($res_wms)){
+ $wms_id[$cnt_wms] = $row["wms_id"];
$wms_title[$cnt_wms] = $row["wms_title"];
$wms_abstract[$cnt_wms] = $row["wms_abstract"];
$wms_getcapabilities[$cnt_wms] = $row["wms_getcapabilities"];
@@ -179,8 +184,8 @@
echo " <tbody >";
for($i=0; $i<$cnt_wms; $i++){
echo "<tr class='Farbe' onmouseover='this.style.backgroundColor = \"#F08080\"' onmouseout='this.style.backgroundColor = \"#ffffff\"'>";
- echo "<td><div id ='id_".$wms_title[$i]."' class='even' name ='name_".$wms_title[$i]."' style='cursor:pointer' onclick = 'mod_addWMS(\"".$wms_getcapabilities[$i]."\",\"".$wms_version[$i]."\")'>".$wms_title[$i]."</div></td>";
- echo "<td><div id ='id_".$wms_abstract[$i]."' class='even' name ='name_".$wms_abstract[$i]."' style='cursor:pointer' onclick = 'mod_addWMS(\"".$wms_getcapabilities[$i]."\",\"".$wms_version[$i]."\")'>".$wms_abstract[$i]."</div></td>";
+ echo "<td><div id ='id_".$wms_title[$i]."' class='even' name ='name_".$wms_title[$i]."' style='cursor:pointer' onclick = 'mod_addWMSfromDB(\"\",\"".$wms_id[$i]."\")'>".$wms_title[$i]."</div></td>";
+ echo "<td><div id ='id_".$wms_abstract[$i]."' class='even' name ='name_".$wms_abstract[$i]."' style='cursor:pointer' onclick = 'mod_addWMSfromDB(\"\",\"".$wms_id[$i]."\")'>".$wms_abstract[$i]."</div></td>";
echo "</tr>";
}
echo " </tbody>";
Modified: trunk/mapbender/http/javascripts/mod_addWMSfromfilteredList_ajax.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_addWMSfromfilteredList_ajax.php 2008-07-01 10:11:13 UTC (rev 2570)
+++ trunk/mapbender/http/javascripts/mod_addWMSfromfilteredList_ajax.php 2008-07-01 10:18:52 UTC (rev 2571)
@@ -239,7 +239,8 @@
var onClick = "mod_addWMSfromDB('" + guiId + "', '" + wmsArray[i].id + "')";
}
else {
- var onClick = "mod_addWMSfromfilteredList('" + wmsArray[i].getCapabilitiesUrl + "', '" + wmsArray[i].version + "')";
+ var onClick = "mod_addWMSfromDB('" + guiId + "', '" + wmsArray[i].id + "')";
+// var onClick = "mod_addWMSfromfilteredList('" + wmsArray[i].getCapabilitiesUrl + "', '" + wmsArray[i].version + "')";
}
addRow("resultTableBody", wmsArray[i].title, wmsArray[i].abstract, onClick);
}
More information about the Mapbender_commits
mailing list