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

Eric Lemoine eric.c2c at gmail.com
Fri Feb 27 08:08:24 EST 2009


On Fri, Feb 27, 2009 at 12:50 PM, Christopher Schmidt
<crschmidt at metacarta.com> wrote:
> 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."

Sounds good to me actually. I just wanted to mention alternatives.

--
Eric



More information about the Dev mailing list