svn commit: r455 - trunk/mapbender/http/javascripts/map.php

astrid_emde at osgeo.org astrid_emde at osgeo.org
Fri Jun 16 05:05:08 EDT 2006


Author: astrid_emde
Date: 2006-06-16 09:05:08+0000
New Revision: 455

Modified:
   trunk/mapbender/http/javascripts/map.php

Log:
if scale < 1 the scale is shown with decimal places

Modified: trunk/mapbender/http/javascripts/map.php
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/javascripts/map.php?view=diff&rev=455&p1=trunk/mapbender/http/javascripts/map.php&p2=trunk/mapbender/http/javascripts/map.php&r1=454&r2=455
==============================================================================
--- trunk/mapbender/http/javascripts/map.php	(original)
+++ trunk/mapbender/http/javascripts/map.php	2006-06-16 09:05:08+0000
@@ -1062,7 +1062,11 @@
       var arrayBBox = mb_mapObj[ind].extent.split(",");
       var xtenty =  parseFloat(arrayBBox[3]) - parseFloat(arrayBBox[1]);
       var scaleY = (xtenty / mb_mapObj[ind].height) *(mb_resolution * 100);
-      var Y_str = Math.round(scaleY);
+      if (scaleY<1){
+      	var Y_str = scaleY;
+      }else{
+      	var Y_str = Math.round(scaleY);
+      }
    }   
    return Y_str;   
 }




More information about the Mapbender_commits mailing list