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

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Oct 20 08:15:39 EDT 2009


Author: christoph
Date: 2009-10-20 08:15:39 -0400 (Tue, 20 Oct 2009)
New Revision: 4829

Modified:
   branches/2.6/http/javascripts/mod_coords_div.php
Log:
avoid JS errors

Modified: branches/2.6/http/javascripts/mod_coords_div.php
===================================================================
--- branches/2.6/http/javascripts/mod_coords_div.php	2009-10-20 12:15:13 UTC (rev 4828)
+++ branches/2.6/http/javascripts/mod_coords_div.php	2009-10-20 12:15:39 UTC (rev 4829)
@@ -55,14 +55,20 @@
 	}
 }
 function mod_showCoords_div_click(e){
-	mod_showCoords_div_mapObj.getMousePos(e);
-	var pos = makeClickPos2RealWorldPos(mod_showCoords_div_target, clickX, clickY);
+	var click = mod_showCoords_div_mapObj.getMousePosition(e);
+	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]);
 }
 function mod_showCoords_div_display(e){
-	mod_showCoords_div_mapObj.getMousePos(e);
-	var pos = makeClickPos2RealWorldPos(mod_showCoords_div_target, clickX, clickY);
+	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]);
 }
 function mod_showCoord_write(x,y){



More information about the Mapbender_commits mailing list