[Users] Changing the map part of a mappanel

Phil Scadden p.scadden at gns.cri.nz
Thu Jun 24 03:17:05 CEST 2010


Getting desperate here. I had given up on changing layers in a map 
because it just doesnt work when adding a set of layers with a google 
map to when previous set of layers didnt contain one.

Changed tack completely, set map to null and created a brand new map. 
Problem I replace in mapPanel with this code.
             mapPanel.map = null;
             l = new GeoExt.data.LayerStore({
                 map:map
             });
             mapPanel.layers = l;
             mapPanel.map = map;
             mapPanel.map.zoomToExtent(fullBounds);

It doesnt work. The image in the browser stays the same but no 
responding to mouse-clicks etc. Obviously the map object is not actually 
active in mapPanel.  HELP!!!


-- 
Phil Scadden, Senior Scientist GNS Science Ltd 764 Cumberland St, 
Private Bag 1930, Dunedin, New Zealand Ph +64 3 4799663, fax +64 3 477 5232

Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents.



More information about the Users mailing list