[OpenLayers-Dev] OpenLayers.Layer.Google - maxZoomLevel
Bill Woodall
bwoodall at wardrobe.dhs.org
Fri Mar 30 18:44:53 EDT 2007
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
More information about the Dev
mailing list