[OpenLayers-Users] maxResolution change
Christopher Schmidt
crschmidt at crschmidt.net
Mon Jun 19 13:43:03 CDT 2006
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.
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.
--
Christopher Schmidt
Web Developer
More information about the Users
mailing list