svn commit: r826 - trunk/mapbender/http/php/mod_zoomCoords_en.php

astrid_emde at osgeo.org astrid_emde at osgeo.org
Mon Nov 20 04:11:31 EST 2006


Author: astrid_emde
Date: 2006-11-20 09:11:31+0000
New Revision: 826

Modified:
   trunk/mapbender/http/php/mod_zoomCoords_en.php

Log:
added element var permanentHighlight true or false

Modified: trunk/mapbender/http/php/mod_zoomCoords_en.php
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/php/mod_zoomCoords_en.php?view=diff&rev=826&p1=trunk/mapbender/http/php/mod_zoomCoords_en.php&p2=trunk/mapbender/http/php/mod_zoomCoords_en.php&r1=825&r2=826
==============================================================================
--- trunk/mapbender/http/php/mod_zoomCoords_en.php	(original)
+++ trunk/mapbender/http/php/mod_zoomCoords_en.php	2006-11-20 09:11:31+0000
@@ -84,12 +84,13 @@
 	    -->
 </style>
 <?php
-
+$gui_id = $_SESSION["mb_user_gui"];
+$e_id_css = $_REQUEST["elementID"];
 $con = db_connect($DBSERVER,$OWNER,$PW);
 db_select_db(DB,$con);
-$sql = "SELECT e_target FROM gui_element WHERE e_id = 'zoomCoords' AND fkey_gui_id = $1";
-$v = array($_SESSION["mb_user_gui"]);
-$t = array('s');
+$sql = "SELECT e_target FROM gui_element WHERE e_id = $1 AND fkey_gui_id = $2";
+$v = array($e_id_css,$gui_id);
+$t = array('s','s');
 $res = db_prep_query($sql,$v,$t);
 $cnt = 0;
 while($row = db_fetch_array($res)){
@@ -101,11 +102,20 @@
 if($cnt > 1){ echo "alert('zoomCoords: ID not unique!');";}
 
 echo "var mod_zoomCoords_target = '".$e_target."';";
-echo "var target = mod_zoomCoords_target.split(',')";
-echo "</script>";
+echo "var target = mod_zoomCoords_target.split(',');";
+
+
+include('../include/dyn_js.php');
+
 ?>
-<script type="text/javascript">
-<!--
+try{
+	if (permanentHighlight){}
+}
+catch(e){
+	permanentHighlight = 'false';
+}
+
+
 function zoomCoordinate(){
    var coordx = document.form1.X.value; 
    var coordy = document.form1.Y.value;
@@ -127,10 +137,14 @@
       valid = false;
       return false;
    }   */
-   setPermanentMarker(coordx,coordy);
+   
+   if(permanentHighlight =='true'){
+	   setPermanentMarker(coordx,coordy);
+   }
    parent.mb_hideHighlight(target[0]);
    parent.mb_hideHighlight(target[1]);
    parent.zoom(target[0],true, 1.0,coordx,coordy);
+  
 }
 
 function highlight(x, y){
@@ -158,6 +172,10 @@
 function setPermanentMarker(x,y){
    parent.mod_permanentHighlight_x = parseFloat(x);
    parent.mod_permanentHighlight_y = parseFloat(y);
+   parent.mod_permanentHighlight_text = x + ' / '+ y;
+   //alert('setPermanentMarker'+ parseFloat(x) + parseFloat(y));
+   
+   parent.mod_permanentHighlight_init();
 }
 // -->
 </script>




More information about the Mapbender_commits mailing list