[Mapbender-commits] r2564 - branches/2.5/http/javascripts
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Mon Jun 30 09:42:52 EDT 2008
Author: verenadiewald
Date: 2008-06-30 09:42:52 -0400 (Mon, 30 Jun 2008)
New Revision: 2564
Modified:
branches/2.5/http/javascripts/mod_addWMSfromList.php
branches/2.5/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: branches/2.5/http/javascripts/mod_addWMSfromList.php
===================================================================
--- branches/2.5/http/javascripts/mod_addWMSfromList.php 2008-06-30 13:41:54 UTC (rev 2563)
+++ branches/2.5/http/javascripts/mod_addWMSfromList.php 2008-06-30 13:42:52 UTC (rev 2564)
@@ -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: branches/2.5/http/javascripts/mod_addWMSfromfilteredList_ajax.php
===================================================================
--- branches/2.5/http/javascripts/mod_addWMSfromfilteredList_ajax.php 2008-06-30 13:41:54 UTC (rev 2563)
+++ branches/2.5/http/javascripts/mod_addWMSfromfilteredList_ajax.php 2008-06-30 13:42:52 UTC (rev 2564)
@@ -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