[OpenLayers-Users] Spherical Mercator and PanZoomBar with Scales
Christopher Schmidt
crschmidt at metacarta.com
Thu Apr 3 12:05:52 EDT 2008
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
More information about the Users
mailing list