[OpenLayers-Trac] [OpenLayers] #1321: maxScale value not always respected

OpenLayers trac at openlayers.org
Wed Feb 20 18:04:26 EST 2008


#1321: maxScale value not always respected
-------------------------------+--------------------------------------------
  Reporter:  openlayers        |       Owner:  euzuro                      
      Type:  bug               |      Status:  new                         
  Priority:  major             |   Milestone:  2.7 Release                 
 Component:  Layer             |     Version:  2.4                         
Resolution:                    |    Keywords:  layer scale resolution patch
     State:  Needs Discussion  |  
-------------------------------+--------------------------------------------
Comment (by tschaub):

 The fix I put in for #1300 contained most of what is needed here.  The
 problem is that numZoomLevels is calculated assuming exponential scaling
 with base 2.  This means minResolution or maxScale is rarely respected.
 Better behavior is to use base 2 scaling when calculating numZoomLevels,
 but then to actually calculate the real base that ensures the lower bound
 is reached.

 The fix for #1300 was conservative - it only respected the lower bound if
 you also specified numZoomLevels in your layer options.  This patch is a
 bit more generous.  It respects the lower bound whether or not you
 explicitly specify numZoomLevels.

 I think this is a worthwhile fix for 2.6.

-- 
Ticket URL: <http://trac.openlayers.org/ticket/1321#comment:2>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer


More information about the Trac mailing list