[OpenLayers-Users] Spherical Mercator and PanZoomBar with Scales
Linda Rawson
linda.rawson at gmail.com
Thu Apr 3 12:21:27 EDT 2008
Actually I have quite the hack to do this. But I was hoping not to
hack anymore! It looked so promising to be able to define scales on
the map that I was hoping it would carry over.
Thanks!
Linda
On Thu, Apr 3, 2008 at 10:05 AM, Christopher Schmidt
<crschmidt at metacarta.com> wrote:
> On Thu, Apr 03, 2008 at 09:56:38AM -0600, Linda Rawson wrote:
> > What I was hoping for with 2.6 was the following:
>
> 2.6 doesn't change the behavior in this regard in any way I'm aware of.
> Was there something that made you think it would?
>
> There is no way to define anything other than factor-of-two zoom changes
> on a Google Maps baselayer in OpenLayers: hacking the zoombar won't help
> you here.
>
> -- Chris
>
>
> > 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
>
> > _______________________________________________
> > Users mailing list
> > Users at openlayers.org
> > http://openlayers.org/mailman/listinfo/users
>
>
> --
> Christopher Schmidt
> MetaCarta
>
--
Linda Rawson
More information about the Users
mailing list