[Users] Add a Layer to LayerStore after it has been created
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'));
> can someone please explain this to me,
> Thank you for your time and consideration,
> Users mailing list
> Users at geoext.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Users