Please read the docs: http://dev.geoext.org/docs/lib/GeoExt/widgets/form/GeocoderComboBox.html. The "layer" config option takes a vector layer that is used to display the placemark. If you want to search a GeoServer layer for a specific field, you will need a configuration like in this example: http://dev.geoext.org/trunk/geoext/examples/geocoder-wfs.html
Andreas. 2012/2/29 Francesc Cañas <kikoca...@gmail.com>: >> I succes to put the searcher in my map as the example, but I don't have >> OSM. >> There's any way to modify it to search my own Layers? >> >> I have layers from Geoserver, >> I've tried this way but only search Cities names instead of names of the >> fields of my layers, I don't understand why. >> >> >> >> //the layer that I want to be searchable >> >> var Projectes = new OpenLayers.Layer.WMS( >> "Projectes", >> "http://localhost:8080/geoserver/AUMA/wms", >> { >> layers: 'AUMA:Projectes', >> transparent:true, >> format: 'image/png'}, >> { >> isBaseLayer:false, >> buffer: 0 >> }); >> >> //the mapPanel with baselayers and the searching code inside the toolbar >> >> mapPanel = new GeoExt.MapPanel({ >> border: true, >> region: "center", >> map: map, >> height: 500, >> width: 800, >> title: 'Estudis i enginyeries', >> zoom: 1, >> maxExtent: new OpenLayers.Bounds(-90, -180, 90, 180), >> center: new OpenLayers.LonLat (-3,0), >> bbar: [escala,' ',zoomSelector,' ',Projection,' ',cordX,' ',cordY], >> >> tbar: [toolbarItems,{ >> xtype:"gx_geocodercombo", >> emptyText: "Search GeoNames", >> layer: Projectes, >> width: 200 >> }], >> layers: [ >> new OpenLayers.Layer.WMS( >> "BlueMarble", "http://www.opengis.uab.es/cgi-bin/world/MiraMon.cgi?", >> { >> layers:['BlueMarble_NG','admin_level1-world'] >> }, { >> buffer: 0, >> visibility: false >> } >> ), >> >> new OpenLayers.Layer.WMS( >> "OpenLayers WMS", "http://vmap0.tiles.osgeo.org/wms/vmap0", >> { >> layers:['basic'] >> },{ >> buffer: 0, >> visibility: false >> } >> ), >> >> Projectes ] >> }); >> >> Thanks a lot for your help! >> >> -- >> http://kikocanas.blogspot.com > > > > > -- > http://kikocanas.blogspot.com > > _______________________________________________ > Users mailing list > Users@geoext.org > http://www.geoext.org/cgi-bin/mailman/listinfo/users > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. _______________________________________________ Users mailing list Users@geoext.org http://www.geoext.org/cgi-bin/mailman/listinfo/users