OpenLayers.Layer.Google - maxZoomLevel

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

OpenLayers.Layer.Google - maxZoomLevel

E.Stefanakis
Dear All
 
I wish to zoom further than maxZoomLevel of 17 in GoogleMaps (defined in Google.js).
 
Is there any way to do it ?
 
Thanks in advance!
 
Emmanuel

_______________________________________________
Dev mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: OpenLayers.Layer.Google - maxZoomLevel

Bill Woodall-2
Hi Emmanuel,

There are at least two ways;

Modify your Google.js to have the modified lines

        /** @final @type int */
          MAX_ZOOM_LEVEL: 19,
       
        /** Hardcode these resolutions so that they are more closely
          *   tied with the standard wms projection
          *
          * this version takes the RESOLUTION array out to 22 levels
          *
          * @final @type Array(float)
          */
          RESOLUTIONS:
        [1.40625,0.703125,0.3515625,0.17578125,0.087890625,0.0439453125,0.02197265625,0.010986328125,0.0054931640625,0.00274658203125,0.001373291015625,0.0006866455078125,0.00034332275390625,0.000171661376953125,0.0000858306884765625,0.00004291534423828125,0.000021457672119140625,0.0000107288360595703125,0.00000536441802978515625,0.000002682209014892578125,0.0000013411045074462890625,0.00000067055225372314453125],
       
This approach might not be the best if used in a group environment where
others need it set to the default

Second approach is to overload the values in your init() before you call
the OpenLayer.Layer.Google()

        OpenLayers.Layer.Google.prototype.MAX_ZOOM_LEVEL = 19 ;
        OpenLayers.Layer.Google.prototype.RESOLUTIONS = [ <insert that
        long line above> ] ;
        var yourGmapLayer = new OpenLayers.Layer.Google( "Google",
        {type: G_NORMAL_MAP} );

.......Bill,

On Fri, 2007-03-30 at 23:59 +0300, E.Stefanakis wrote:

> Dear All
>  
> I wish to zoom further than maxZoomLevel of 17 in GoogleMaps (defined
> in Google.js).
>  
> Is there any way to do it ?
>  
> Thanks in advance!
>  
> Emmanuel


_______________________________________________
Dev mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/dev