OpenLayers OpenLayers

Changeset 2244

Show
Ignore:
Timestamp:
02/19/07 17:42:17 (2 years ago)
Author:
sderle
Message:

Control.Scale now correctly reports scales under 1:500. Includes tests. Fixes #503.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/openlayers/lib/OpenLayers/Control/Scale.js

    r1721 r2244  
    5454            scale = Math.round(scale / 1000000) + "M"; 
    5555        } else { 
    56             scale = Math.round(scale / 100) * 100; 
    57         } 
     56            scale = Math.round(scale); 
     57        }     
     58         
    5859        this.element.innerHTML = "Scale = 1 : " + scale; 
    5960    },  
  • trunk/openlayers/tests/list-tests.html

    r1927 r2244  
    3232    <li>test_Control_PanZoomBar.html</li> 
    3333    <li>test_Control_Permalink.html</li> 
     34    <li>test_Control_Scale.html</li> 
    3435    <li>test_Map.html</li> 
    3536</ul>