[Mapbender-commits] r1304 - trunk/mapbender/http/javascripts

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue May 8 11:27:45 EDT 2007


Author: christoph
Date: 2007-05-08 11:27:45 -0400 (Tue, 08 May 2007)
New Revision: 1304

Modified:
   trunk/mapbender/http/javascripts/mod_highlightPOI.php
Log:
bugfix: move highlight only half of image width/height

Modified: trunk/mapbender/http/javascripts/mod_highlightPOI.php
===================================================================
--- trunk/mapbender/http/javascripts/mod_highlightPOI.php	2007-05-08 14:56:28 UTC (rev 1303)
+++ trunk/mapbender/http/javascripts/mod_highlightPOI.php	2007-05-08 15:27:45 UTC (rev 1304)
@@ -152,7 +152,8 @@
   var tagSource = "";
   for(var i=0; i<mod_highlightPOI_params.length; i=i+3){
     var pos = makeRealWorld2mapPos(mod_highlightPOI_target,mod_highlightPOI_params[i+1], mod_highlightPOI_params[i+2]);
-    tagSource += "<div style='z-index:13;position:absolute;left:"+(pos[0]-poi_width)+"px;top:"+(pos[1]-poi_height)+"px'>";
+    console.log("%s %s", poi_width, poi_height);
+    tagSource += "<div style='z-index:13;position:absolute;left:"+(pos[0]-Math.round(0.5*poi_width))+"px;top:"+(pos[1]-Math.round(0.5*poi_height))+"px'>";
     tagSource += "<img src='"+poi_image+"'>";
     tagSource += "<span style='"+poi_style+"'>"+mod_highlightPOI_params[i]+"<span>";
     tagSource += "</div>";



More information about the Mapbender_commits mailing list