Changes between Version 18 and Version 19 of SettingZoomLevels

Show
Ignore:
Timestamp:
07/01/09 09:54:16 (4 years ago)
Author:
tmcw
Comment:

Documenting serverResolutions and TMS layers

Legend:

Unmodified
Added
Removed
Modified
  • SettingZoomLevels

    v18 v19  
    240240}}} 
    241241 
    242  
    243  
     242== TMS Layers == 
     243 
     244Setting the resolutions array in the traditional manner does not work with TMS layers by design. Instead of removing values from the resolutions array to restrict zoom levels (for unrendered TMS layers or other reasons), include both a serverResolutions array and a resolutions array. The serverResolutions array should include all resolutions available (whether rendered or not) on the  server, while the resolutions array should have all resolutions that are ''presented to the user'' - therefore the resolutions array should be a ''subset'' of serverResolutions. For instance, 
     245 
     246{{{ 
     247resolutions: [0.17578125, 0.087890625, 0.0439453125], 
     248serverResolutions: [0.703125, 0.3515625, 0.17578125, 0.087890625, 0.0439453125], 
     249}}} 
    244250 
    245251''Note: Some users may have noticed the existence of 'MIN_ZOOM_LEVELS' and 'MAX_ZOOM_LEVELS' properties as defined on the 3rd party layers. These are '''constant''' values and should not be modified. They are set by the creators of the 3rd party layers to specify to the !FixedZoomLevels class the specifics of setting up their resolutions arrays. I repeat: these should *not* be modified by users: use instead the three options as explained above ('minZoomLevel', 'maxZoomLevel', and 'numZoomLevels')'''