[OpenLayers-Dev] [OpenLayers-Trac] [OpenLayers] #1901: Map Initialization, renderTo, etc.

Christopher Schmidt crschmidt at metacarta.com
Fri Feb 27 06:50:23 EST 2009


On Fri, Feb 27, 2009 at 09:10:34AM -0000, OpenLayers wrote:
>  In this way, if the user knows upfront the size of the map div he or she
>  can still use {{{maxResolution: auto}}} with something like that:
> 
>  {{{
>  var map = new OpenLayers.Map({
>      maxResolution: "auto",
>      numResolutions: 10,
>      divHeight: "400px",
>      divWidth: "600px"
>  });
>  }}}

If the user knows the size of the map up front, then the user can
just divide the maxExtent by the larger of the two dimensions; this
feels like an unneccesary step to me. I'd rather just document it:
"Don't use maxRes: 'auto' with an uninitialized map." 

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Dev mailing list