<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
Hi,<br>
<br>
If the layerstore is correctly synched to the map then adding the
layer to the map should add it directly to the store.<br>
Otherwise:<br>
<br>
store.loadData([layer], true); //second parameter is to append the
data<br>
<br>
Regards,<br>
<br>
Seth<br>
<br>
On 23/11/2010 18:48, IT Intern wrote:
<blockquote
cite="mid:AANLkTi=ich1po+=pCwx24VXhsZestxGU8gxXQizXxvZU@mail.gmail.com"
type="cite">Hello GeoExt users,<br>
<br>
I am sure this is easy but I must be doing something wrong as I've
been getting errors and wrong results.<br>
<br>
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();<br>
<br>
layerStore.insert(0, map.getLayersByName('Panoramio Photos')[0]);<br>
<br>
can someone please explain this to me,<br>
<br>
Thank you for your time and consideration,<br>
<br>
elshae<br>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@geoext.org">Users@geoext.org</a>
<a class="moz-txt-link-freetext" href="http://www.geoext.org/cgi-bin/mailman/listinfo/users">http://www.geoext.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>