[OpenLayers-Users] Openlayers 2.6 - zoomLevels.html

Diego Guidi diegoguidi at gmail.com
Wed Apr 2 17:17:39 EDT 2008


I think that the correct param is resolutions and not scales
so
resolutions: [50000000, 10000000],

On Wed, Apr 2, 2008 at 11:13 PM, Linda Rawson <linda.rawson at gmail.com> wrote:
> I want to make the panZoomBar contain specific scales.  How do I do that?
>
> I have tried the following the the zoomLevels.html
>
>         var lon = 50;
>         var lat = 0;
>         var zoom = 0;
>         var map, layer;
>         function init(){
>             OpenLayers.DOTS_PER_INCH = 72;
>             var options = {
>                           scales: [50000000, 10000000],
>                             controls: [new
> OpenLayers.Control.MouseDefaults()]
>                            };
>             map = new OpenLayers.Map( 'map' , options);
>             map.addControl(new OpenLayers.Control.PanZoomBar());
>             layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
>                     "http://labs.metacarta.com/wms/vmap0", {layers:
> 'basic'});
>              map.addLayer(layer);
>
>             map.setCenter(new OpenLayers.LonLat(lon, lat), zoom);
>       }
>
> I expected to see only two bars in the PanZoomBar.  What do I need to do to
> see that?
>
> --
> Linda Rawson
> _______________________________________________
>  Users mailing list
>  Users at openlayers.org
>  http://openlayers.org/mailman/listinfo/users
>
>



-- 
Diego Guidi
http://lacorrente.blogspot.com



More information about the Users mailing list