[OpenLayers-Users] maxResolution change
Chris Holmes
cholmes at openplans.org
Mon Jun 19 14:14:26 CDT 2006
Christopher Schmidt wrote:
> If you're using OpenLayers for any current projects:
>
> I just changed the default maxResolution in subversion to match the
> degrees/pixel that Google Maps uses at its highest zoom level. There are
> a number of reasons for this:
> * Encourages cachability in the default OpenLayers setup
> * Prevents rounding errors which were occuring when using math to
> determine maxResolution
> * Matches the Google Maps zoom levels, making it easier to convert
> Google Maps style applications to OpenLayers.
Interesting. Does it match it at the levels all the way zoomed out? My
understanding is that Gmaps uses Mercator for the first five or so zoom
levels, so for getting gmaps working with GeoServer we have it request
EPSG:41001 (mercator) when zoomed out, and EPSG:4326 (lat/long) when
zoomed in. Is openlayers doing something similar? Or just using 4326
the whole time?
Chris
>
> The negative of this is that the whole world does not, by default, fit
> into the element that you're viewing it in anymore -- instead it fits
> into a 256 pixel tile. This may break behavior for some applications. To
> get the old behavior back, use:
>
> new OpenLayers.Map('mapdiv', {maxResolution:null});
>
> in your Map Constructor.
>
> If you have any questions, please feel free to ask.
>
--
Chris Holmes
The Open Planning Project
http://topp.openplans.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cholmes.vcf
Type: text/x-vcard
Size: 269 bytes
Desc: not available
Url : http://mailman-viper.python-hosting.com/pipermail/users/attachments/20060619/08c833f8/cholmes.vcf
More information about the Users
mailing list