[Mapbender-commits] r5315 - branches/2.6/http/javascripts

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Wed Jan 13 06:07:06 EST 2010


Author: christoph
Date: 2010-01-13 06:07:06 -0500 (Wed, 13 Jan 2010)
New Revision: 5315

Modified:
   branches/2.6/http/javascripts/mod_coords_div.php
Log:


Modified: branches/2.6/http/javascripts/mod_coords_div.php
===================================================================
--- branches/2.6/http/javascripts/mod_coords_div.php	2010-01-13 11:06:02 UTC (rev 5314)
+++ branches/2.6/http/javascripts/mod_coords_div.php	2010-01-13 11:07:06 UTC (rev 5315)
@@ -59,24 +59,22 @@
 	if (click === null) {
 		return;
 	}
-	var pos = makeClickPos2RealWorldPos(mod_showCoords_div_target, click.x, click.y);
-	mod_showCoords_div_fix = "Selection: " + pos[0] + " / " +  pos[1];
-	mod_showCoord_write(pos[0],pos[1]);
+	var pos = mod_showCoords_div_mapObj.convertPixelToReal(click);
+	mod_showCoords_div_fix = "Selection: " + pos.x + " / " +  pos.y;
+	mod_showCoord_write(pos);
 }
 function mod_showCoords_div_display(e){
 	var click = mod_showCoords_div_mapObj.getMousePosition(e);
 	if (click === null) {
 		return;
 	}
-	var pos = makeClickPos2RealWorldPos(mod_showCoords_div_target, click.x, click.y);
-	mod_showCoord_write(pos[0],pos[1]);
+	var pos = mod_showCoords_div_mapObj.convertPixelToReal(click);
+	mod_showCoord_write(pos);
 }
-function mod_showCoord_write(x,y){
-	if(document.getElementById("dependentDiv")){
-		var str = x + " / " +  y;
-		if(mod_showCoords_div_fix != ""){
-			str += "<div>" + mod_showCoords_div_fix + "</div>";
-		}
-		writeTag("","dependentDiv", str);
+function mod_showCoord_write(pos){
+	var str = "<span>" + pos.x + " / " +  pos.y + "</span>";
+	if(mod_showCoords_div_fix != ""){
+		str += "<div>" + mod_showCoords_div_fix + "</div>";
 	}
+	$("#dependentDiv").html(str);
 }



More information about the Mapbender_commits mailing list