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

geographika geographika at gmail.com
Tue Nov 23 19:53:33 CET 2010


If the layerstore is correctly synched to the map then adding the layer 
to the map should add it directly to the store.

store.loadData([layer], true); //second parameter is to append the data



On 23/11/2010 18:48, IT Intern wrote:
> 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
> _______________________________________________
> Users mailing list
> Users at geoext.org
> http://www.geoext.org/cgi-bin/mailman/listinfo/users

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

More information about the Users mailing list