[Users] Add a Layer to LayerStore after it has been created

IT Intern itintern12 at gmail.com
Tue Nov 23 18:48:22 CET 2010


Hello GeoExt users,

I am sure this is easy but I must be doing something wrong as I've been
getting errors and wrong results.

I have a layer store and then later on in my code I want to add another
layer to it.  I have tried both the .add() and .insert() methods without
success, preferably would like to use .insert();

layerStore.insert(0, map.getLayersByName('Panoramio Photos')[0]);

can someone please explain this to me,

Thank you for your time and consideration,

elshae
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20101123/62065d76/attachment.htm 


More information about the Users mailing list