Author:   Lars Michelsen <[email protected]>
Date:     Tue Nov  6 08:31:48 2012 +0100
Committer:   Lars Michelsen <[email protected]>
Commit-Date: Tue Nov  6 08:31:48 2012 +0100

Bugfix: Geomap - always rounding calculated coordinates

---

 ChangeLog                            |    4 ++++
 share/server/core/sources/geomap.php |    4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index eb9b9f0..f5fd299 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+1.7.4
+Core:
+  * Bugfix: Geomap - always rounding calculated coordinates
+
 1.7.3
 Core:
   * Bugfix: Fixed problem in geomap exception handling
diff --git a/share/server/core/sources/geomap.php 
b/share/server/core/sources/geomap.php
index 866f1b1..3eadd45 100644
--- a/share/server/core/sources/geomap.php
+++ b/share/server/core/sources/geomap.php
@@ -265,10 +265,10 @@ function process_geomap($MAPCFG, $map_name, &$map_config) 
{
             continue;
 
         // Calculate the lat (y) coords
-        $obj['y'] = $params['height'] - ($lat_para * ($obj['lat'] - 
$img_down)) - ($icon_h / 2);
+        $obj['y'] = round($params['height'] - ($lat_para * ($obj['lat'] - 
$img_down)) - ($icon_h / 2));
         
         // Calculate the long (x) coords
-        $obj['x'] = ($long_para * ($obj['long'] - $img_left)) - ($icon_w / 2);
+        $obj['x'] = round(($long_para * ($obj['long'] - $img_left)) - ($icon_w 
/ 2));
         unset($obj['lat']);
         unset($obj['long']);
     }


------------------------------------------------------------------------------
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
_______________________________________________
Nagvis-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagvis-checkins

Reply via email to