[Mapbender-commits] r2666 -
branches/testbaudson_dev/http/javascripts
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Thu Jul 17 08:05:08 EDT 2008
Author: christoph
Date: 2008-07-17 08:05:08 -0400 (Thu, 17 Jul 2008)
New Revision: 2666
Modified:
branches/testbaudson_dev/http/javascripts/mod_addWMSfromList.php
branches/testbaudson_dev/http/javascripts/mod_addWMSfromfilteredList_ajax.php
branches/testbaudson_dev/http/javascripts/mod_measure.php
branches/testbaudson_dev/http/javascripts/mod_pan.php
Log:
Modified: branches/testbaudson_dev/http/javascripts/mod_addWMSfromList.php
===================================================================
--- branches/testbaudson_dev/http/javascripts/mod_addWMSfromList.php 2008-07-17 12:03:59 UTC (rev 2665)
+++ branches/testbaudson_dev/http/javascripts/mod_addWMSfromList.php 2008-07-17 12:05:08 UTC (rev 2666)
@@ -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/testbaudson_dev/http/javascripts/mod_addWMSfromfilteredList_ajax.php
===================================================================
--- branches/testbaudson_dev/http/javascripts/mod_addWMSfromfilteredList_ajax.php 2008-07-17 12:03:59 UTC (rev 2665)
+++ branches/testbaudson_dev/http/javascripts/mod_addWMSfromfilteredList_ajax.php 2008-07-17 12:05:08 UTC (rev 2666)
@@ -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);
}
Modified: branches/testbaudson_dev/http/javascripts/mod_measure.php
===================================================================
--- branches/testbaudson_dev/http/javascripts/mod_measure.php 2008-07-17 12:03:59 UTC (rev 2665)
+++ branches/testbaudson_dev/http/javascripts/mod_measure.php 2008-07-17 12:05:08 UTC (rev 2666)
@@ -143,10 +143,10 @@
function drawDashedLine(){
//check if epsg has changed
var ind = getMapObjIndexByName(mod_measure_target);
+ mod_measure_width = mb_mapObj[ind].width;
+ mod_measure_height = mb_mapObj[ind].height;
if(mod_measure_epsg != mb_mapObj[ind].epsg){
mod_measure_delete();
- mod_measure_width = mb_mapObj[ind].width;
- mod_measure_height = mb_mapObj[ind].height;
mod_measure_epsg = mb_mapObj[ind].epsg;
}
var str_mPoints = "<div style='position:absolute;left:0px;top:0px' ><img src='"+mb_trans.src+"' width='"+mod_measure_width+"' height='0'></div>";
Modified: branches/testbaudson_dev/http/javascripts/mod_pan.php
===================================================================
--- branches/testbaudson_dev/http/javascripts/mod_pan.php 2008-07-17 12:03:59 UTC (rev 2665)
+++ branches/testbaudson_dev/http/javascripts/mod_pan.php 2008-07-17 12:05:08 UTC (rev 2666)
@@ -43,12 +43,18 @@
mb_button[ind].stop = new Function ("mod_pan_disable()");
}
function mod_pan_click(){
+ var p = window.frames[mod_pan_target].document.getElementById("maps");
+ p.style.cursor = "pointer";
+
var el = window.frames[mod_pan_target].document;
el.onmousedown = mod_pan_start;
el.onmouseup = mod_pan_stop;
el.onmousemove = mod_pan_run;
}
function mod_pan_disable(){
+ var p = window.frames[mod_pan_target].document.getElementById("maps");
+ p.style.cursor = "";
+
var el = window.frames[mod_pan_target].document;
el.onmousedown = null;
el.onmouseup = null;
More information about the Mapbender_commits
mailing list