OpenLayers OpenLayers

Changeset 28

Show
Ignore:
Timestamp:
05/13/06 10:25:28 (3 years ago)
Author:
crschmidt
Message:

More zoom level bounds checking.

Files:

Legend:

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

    r23 r28  
    226226        } 
    227227 
    228         this.moveToNewExtent(); 
     228        this.moveToNewExtent(zoomChanged); 
    229229    }, 
    230230     
     
    245245     */ 
    246246    zoomIn: function() { 
    247         if (this.zoom != null) { 
     247        if (this.zoom != null && this.zoom <= this.getZoomLevels()) { 
    248248            this.zoom += 1; 
    249249            this.moveToNewExtent(true); 
     
    257257     */ 
    258258    zoomTo: function(zoom) { 
     259       if (zoom >= 0 && zoom <= this.getZoomLevels()) { 
    259260            this.zoom = zoom; 
    260261            this.moveToNewExtent(true); 
     262       } 
    261263    }, 
    262264