<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>I succes to put the searcher in my map as the example, but I don&#39;t have OSM. </div><div>
There&#39;s any way to modify it to search my own Layers? </div><div><br></div><div>I have layers from Geoserver, </div><div>
I&#39;ve tried this way but only search Cities names instead of names of the fields of my layers, I don&#39;t understand why.</div><div><br></div><div><br></div><div><br></div><div>//the layer that I want to be searchable</div>

<div><br></div><div><div>var Projectes = new OpenLayers.Layer.WMS(</div><div><span style="white-space:pre-wrap">                                        </span>&quot;Projectes&quot;,</div><div><span style="white-space:pre-wrap">                                        </span>&quot;<a href="http://localhost:8080/geoserver/AUMA/wms" target="_blank">http://localhost:8080/geoserver/AUMA/wms</a>&quot;,</div>

<div><span style="white-space:pre-wrap">                                        </span>{</div><div>                     layers: &#39;AUMA:Projectes&#39;,</div><div><span style="white-space:pre-wrap">                                        </span> transparent:true,</div>
<div><span style="white-space:pre-wrap">                                        </span> format: &#39;image/png&#39;},</div><div><span style="white-space:pre-wrap">                                        </span> {</div><div><span style="white-space:pre-wrap">                                        </span> isBaseLayer:false, </div>

<div><span style="white-space:pre-wrap">                                        </span> buffer: 0</div><div><span style="white-space:pre-wrap">                                        </span>});</div></div><div><br></div><div>//the mapPanel with baselayers and the searching code inside the toolbar</div>

<div><br></div><div><div>mapPanel = new GeoExt.MapPanel({</div><div>        border: true,</div><div>        region: &quot;center&quot;,</div><div><span style="white-space:pre-wrap">                </span>map: map,</div>
<div>        height: 500,</div><div>        width: 800,</div><div><span style="white-space:pre-wrap">                </span>title: &#39;Estudis i enginyeries&#39;,</div><div><span style="white-space:pre-wrap">                </span>zoom: 1,</div>
<div><span style="white-space:pre-wrap">                </span>maxExtent: new OpenLayers.Bounds(-90, -180, 90, 180),</div><div><span style="white-space:pre-wrap">                </span>center: new OpenLayers.LonLat (-3,0),</div>
<div><span style="white-space:pre-wrap">                </span>bbar: [escala,&#39;  &#39;,zoomSelector,&#39;  &#39;,Projection,&#39;  &#39;,cordX,&#39;  &#39;,cordY],</div><div><span style="white-space:pre-wrap">                </span></div>
<div><br></div><div><b>tbar:</b> [toolbarItems,<b>{ </b></div><div><b>            xtype:&quot;gx_geocodercombo&quot;,</b></div><div><b>            emptyText: &quot;Search GeoNames&quot;,</b></div><div><b><span style="white-space:pre-wrap">                        </span>layer: Projectes,</b></div>

<div><b>            width: 200</b></div><div><b>        }</b>],</div><div><span style="white-space:pre-wrap">                </span>layers: [</div><div>            new OpenLayers.Layer.WMS(</div><div><span style="white-space:pre-wrap">                                </span>&quot;BlueMarble&quot;, &quot;<a href="http://www.opengis.uab.es/cgi-bin/world/MiraMon.cgi" target="_blank">http://www.opengis.uab.es/cgi-bin/world/MiraMon.cgi</a>?&quot;,</div>

<div><span style="white-space:pre-wrap">                                </span>{</div><div><span style="white-space:pre-wrap">                                </span>layers:[&#39;BlueMarble_NG&#39;,&#39;admin_level1-world&#39;]</div><div><span style="white-space:pre-wrap">                                </span>}, {</div>

<div>                    buffer: 0,</div><div>                    visibility: false</div><div>                }</div><div>            ),</div><div><span style="white-space:pre-wrap">                        </span></div><div>
<span style="white-space:pre-wrap">        </span>      </div><div><span style="white-space:pre-wrap">                        </span>new OpenLayers.Layer.WMS(</div><div><span style="white-space:pre-wrap">                                </span>&quot;OpenLayers WMS&quot;, &quot;<a href="http://vmap0.tiles.osgeo.org/wms/vmap0" target="_blank">http://vmap0.tiles.osgeo.org/wms/vmap0</a>&quot;,</div>

<div><span style="white-space:pre-wrap">                                </span>{</div><div><span style="white-space:pre-wrap">                                </span>layers:[&#39;basic&#39;]</div><div><span style="white-space:pre-wrap">                                </span>},{</div>
<div>                    buffer: 0,</div><div>                    visibility: false</div><div>                }</div><div><span style="white-space:pre-wrap">                                </span>),</div><div><span style="white-space:pre-wrap">                                        </span>      </div>

<div><span style="white-space:pre-wrap">                        </span>Projectes ]</div><div>    });</div></div><div><br></div><div>Thanks a lot for your help!</div><span class="HOEnZb"><font color="#888888"><div><br></div>-- <br><a href="http://kikocanas.blogspot.com" target="_blank">http://kikocanas.blogspot.com</a><br>


</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><a href="http://kikocanas.blogspot.com" target="_blank">http://kikocanas.blogspot.com</a><br>