[OpenLayers-Dev] Adding a vector layer to an invisible map
eric.lemoine at camptocamp.com
Sat Apr 16 06:59:27 EDT 2011
On Friday, April 15, 2011, Julien-Samuel Lacroix <jlacroix at mapgears.com> wrote:
> I'm trying to add a vector layer to a map on an undisplayed element. I get an error in 2.10 and it was working in 2.7.
> After looking at the code it seems related to:
> It's working with 2.7 and 2.8 and started to fail at 2.9.
> I attached a patch that add a test for this. Is this relevant?
> I'm not sure what's the right way to fix this. Fix getCurrentSize() or fix Renderer.js to validate if the size is valid.
I think we should fix Renderer and guard against "invalid" map sizes
(I haven't looked ar what it would look like yet).
Here's what the app developper should be able to do:
mapdiv.style.display = "none";
map = new OpenLayers.Map(mapdiv);
mapdiv.style.display = "block";
I think it'd be great to fix that before 2.11 final.
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine at camptocamp.com
More information about the Dev