[OpenLayers-Users] Spherical Mercator and PanZoomBar with Scales

Linda Rawson linda.rawson at gmail.com
Thu Apr 3 11:56:38 EDT 2008


What I was hoping for with 2.6 was the following:

        var map, layer;
        function init(){
            var options = {
               scales:
[55468034,13867008,3466752,108336,54168,27084,13542,6771],
                projection: "EPSG:900913",
                units: "m",
                maxExtent: new
OpenLayers.Bounds(-20037508,-20037508,20037508,20037508.34),
                controls: []
            };
            map = new OpenLayers.Map( 'map' , options);
   map.addControl(new OpenLayers.Control.PanZoomBar());
      layer = new OpenLayers.Layer.Google("Base",{'sphericalMercator':
true});
            map.addLayer(layer);
            map.zoomToMaxExtent();
        }

Should show 8 bars on the panzoombar.  But it still shows the default number
of zoom levels defined when you say sphericalMercator: true.

Is there any way to do this without customizing the panzoombar?

Thanks!

-- 
Linda Rawson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080403/e9d5de74/attachment.html


More information about the Users mailing list