fix off-by-one error in getZoomForResolution(). Created test to prevent this from happenning again.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@1511 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2006-09-27 23:08:37 +00:00
parent 73fb43712f
commit cf7920ea11
2 changed files with 18 additions and 1 deletions

View File

@@ -393,7 +393,7 @@ OpenLayers.Layer.prototype = {
*/
getZoomForResolution: function(resolution) {
for(var i=1; i <= this.resolutions.length; i++) {
for(var i=1; i < this.resolutions.length; i++) {
if ( this.resolutions[i] < resolution) {
break;
}