Changes between Version 2 and Version 3 of SettingZoomLevels

Show
Ignore:
Timestamp:
08/18/06 23:34:52 (7 years ago)
Author:
euzuro
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SettingZoomLevels

    v2 v3  
    5858 * '''Preset zoom levels''' - ''!ZoomLevels are determined by pre-set arrays of scale or resolution'' 
    5959   * {{{scales}}} - The 'resolutions' array is filled with these scales, each directly converted to resolution. 
     60Example: 
     61{{{ 
     62            var options = { scales: [50000000, 30000000, 10000000, 5000000] }; 
     63            map = new OpenLayers.Map( $('map') , options); 
     64}}} 
     65 
    6066   * {{{resolutions}}} - The 'resolutions' array is taken directly from the options. 
    61  
     67Example: 
     68{{{ 
     69            var options = { resolutions: [1.40625,0.703125,0.3515625,0.17578125,0.087890625,0.0439453125] }; 
     70            map = new OpenLayers.Map( $('map') , options); 
     71}}} 
    6272 * '''Minimums and Maximums''' - ''!ZoomLevels are determined based on a maximum resolution and the number of desired !ZoomLevels'' 
    6373   * Determining maxResolution 
    6474     * {{{minScale}}} - Resolution value is translated from scale using {{{units}}} 
     75Example:  
     76{{{ 
     77            var options = { minScale: 50000000 }; 
     78            map = new OpenLayers.Map( $('map') , options); 
     79}}} 
    6580     * {{{maxExtent}}} AND {{{maxResolution == "auto"}}} - Resolution is calculated based on map's div size and the maxExtent property. If maxExtent is not specified, a default value is inherited from the map. 
     81Example: 
     82{{{ 
     83            var options = { maxResolution: "auto", 
     84                            maxExtent: new OpenLayers.Bounds(-180, -90, 90, 180) }; 
     85            map = new OpenLayers.Map( $('map') , options); 
     86}}} 
    6687     * {{{maxResolution}}} - Resolution value is taken directly from the value specified in the layer options. If no value specified, the default is taken from the map. 
     88Example: 
     89{{{ 
     90            var options = { maxResolution: 0.17578125 }; 
     91            map = new OpenLayers.Map( $('map') , options); 
     92}}} 
    6793   * Determining numZoomLevels 
    6894     * Calculated based on ratio of maxResolution to minResolution 
    6995       * Determining minResolution 
    7096         * {{{maxScale}}} - Resolution value is translated from scale using {{{units}}} 
     97Example: 
     98{{{ 
     99            var options = { maxScale: 10000000 }; 
     100            map = new OpenLayers.Map( $('map') , options); 
     101}}} 
    71102         * {{{minExtent}}} AND {{{minResolution == "auto"}}} - Resolution is calculated based on map's div size and the minExtent property. minExtent ''must be'' specified, as a default value is '''NOT''' inherited from the map. 
     103Example: 
     104{{{ 
     105            var options = { minResolution: "auto", 
     106                            minExtent: new OpenLayers.Bounds(-1, -1, 1, 1) }; 
     107            map = new OpenLayers.Map( $('map') , options); 
     108}}} 
    72109         * {{{minResolution}}} - Resolution value is taken directly from the value specified in the layer options. If no value specified, minResolutions remains null, and numZoomLevels is taken directly (below) 
     110Example: 
     111{{{ 
     112            var options = { minResolution: 0.0439453125 }; 
     113            map = new OpenLayers.Map( $('map') , options); 
     114}}} 
    73115     * {{{numZoomLevels}}} - numZoomLevels value is taken directly from the value specified in the layer options. If no value is specified, the default is taken from the map. 
     116Example: 
     117{{{ 
     118            var options = { numZoomLevels: 5 }; 
     119            map = new OpenLayers.Map( $('map') , options); 
     120}}}