[OpenLayers-Dev] questions about map.setOptions ...
Paul Spencer
pspencer at dmsolutions.ca
Tue Dec 18 20:50:34 EST 2007
http://trac.openlayers.org/ticket/1206 proposes a patch which fixes a
problem with map.setOptions where calling it directly set tileSize,
maxExtent, and theme to default values regardless of existing values.
I think the patch is fine, but it has raised some questions in my mind
about the use of setOptions.
To me, if I am calling setOptions, I am expecting those options to
have some kind of effect. I am not convinced that this function will
do what I expect. In particular,
theme: the only place this.theme is processed is in the initialize
function. Calling setOption on the map with a new theme won't do
anything.
tileSize: this is the default tile size used by layers that don't have
their own tile size. I didn't follow this through ... but it seems
like a scary thing to change after layers have been created.
maxExtent: if you change the maxExtent at some later time after the
map is initialized, should anything happen? What happens if the map
has been drawn at some extent that is not within the maxExtent?
Should some redraw be triggered?
Paul
+-----------------------------------------------------------------+
|Paul Spencer pspencer at dmsolutions.ca |
+-----------------------------------------------------------------+
|Chief Technology Officer |
|DM Solutions Group Inc http://www.dmsolutions.ca/ |
+-----------------------------------------------------------------+
More information about the Dev
mailing list