[OpenLayers-Users] Read a wmc without destroy the map
Arnaud JEAN-CHARLES
a.jean-charles at valabre.com
Mon Jan 16 03:35:55 EST 2012
Hi,
I would like to read a Web Map Context to modify the options of my map :
ZoomLevel, BoudingBox, layers visibility...
I followed the OpenLayers WMC example.
First I tried:
map = format.read(text, {map: map}); // the merge solution
But it creates new layers and doesn't refresh the map.
So I tried :
map.destroy();
map = format.read(text, {map: mapOptions});
But I have an error in my MapPanel and M. Matt Prior answered me that
map.destroy() is the worse solution :
"NO! Never destroy the map unless you want it really and truly gone for
good."
Do you know another solutions to load a WMC or do I have to parse the
data to extract parameters ?
Thanks in advance
Regards
Arno
More information about the Users
mailing list