[OpenLayers-Users] maximum ZoomLevel for google maps
Kenneth Skovhede, GEOGRAF A/S
ks at geograf.dk
Thu Nov 27 15:46:44 EST 2008
From what I can gather, it is not supported in OpenLayers:
http://trac.openlayers.org/wiki/three/RemoveOverlayBaseLayerDichotomy
You can edit the MapGuide scale ranges to match the google ones.
Studio won't let you do it, but in Maestro you can edit the Xml to do so.
Maestro r3481 has support for editing scales (avalible on the download
page).
Regards, Kenneth Skovhede, GEOGRAF A/S
Rodolfo Moreno skrev:
> Thanks Arnd, It works very good.
> On the other hands, I have another question related with it.
> I am overlaying google maps with mapguide's layers. The problem is that the
> displaying scales are different.
> Google maps MAPGUIDE
> 144000 100000
> 72000 52000
> 36000 27000
> 18000 14000
> 9028 7197
> 4514 3728
> 2257 1931
> 1129 1000
>
> Then the overlay of these two layers (google and mapguide) doesn't coincide.
> For example: The corner of the street1 and street2 in google layer is 200m
> toward the north of
> the that corner itself in mapguide layer. It happens due to that google
> layer is to the scale of 1:2257 and mapguide layer is to the scale of
> 1:1931.
>
> Is there any way that both layers have the same scales?
>
> Regards
>
>
> Arnd Wippermann wrote:
>
>> Hi Rodolfo,
>>
>> the patch from the old post is really not needed and there are only 21
>> zoomlevels for Wuppertal.
>>
>> Looking now at the question with a better understanding of OpenLayers, I
>> see, that I have only to set the numZoomLevels for the map object and
>> MAX_ZOOM_LEVEL for the Google layers.
>>
>> The default values are
>>
>> MAX_ZOOM_LEVEL = 19
>> numZoomLevels = 16
>>
>> With the set
>>
>> MAX_ZOOM_LEVEL = 21 (0 - 21 => 22 numZoomLevels)
>> numZoomLevels = 21+1
>>
>> i can get the result without any patch.
>>
>>
>> var maxZOOMLEVEL = 21;
>>
>> map = new OpenLayers.Map('map',
>> {
>> maxExtent: new
>> OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),
>> numZoomLevels: maxZOOMLEVEL+1,
>> maxResolution: 156543.0399,
>> units: 'm',
>> projection: new OpenLayers.Projection("EPSG:900913")
>> });
>>
>> var gsat = new OpenLayers.Layer.Google(
>> "Google Satellite",
>> {type: G_SATELLITE_MAP, sphericalMercator : true, MAX_ZOOM_LEVEL :
>> maxZOOMLEVEL}
>> );
>>
>> At http://gis.ibbeck.de/ginfo/ you can zoom up to 21 zoomlevels.
>>
>> I hope, that helps.
>>
>> Arnd Wippermann
>>
>> _______________________________________________
>> Users mailing list
>> Users at openlayers.org
>> http://openlayers.org/mailman/listinfo/users
>>
>>
>>
>
>
> -----
> Rodolfo Moreno
> CivilEng
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20081127/57e7db0b/attachment.html
More information about the Users
mailing list