[OpenLayers-Users] searching a feature with open layers

Arnd Wippermann arnd.wippermann at web.de
Thu Nov 15 12:10:10 EST 2007


Hi,

You can load your WFS with OpenLayers with option 'extractAttributes': true.


    //OpenLayers.ProxyHost for WFS needed!!!
    layerWFS = new OpenLayers.Layer.WFS( "WFS Titel", WFS_Url,
        {typename: "POLYGONS", maxfeatures: 500}, { typename: "POLYGONS",
extractAttributes: true});
 
Now you have access to the features geometry and the features attributes.

Mit freundlichen Grüssen

Arnd Wippermann
http://gis.ibbeck.de/ginfo/apps/OLExamples/SphericalMercator/OL_900913_frame
s.html



-----Ursprüngliche Nachricht-----
Von: users-bounces at openlayers.org [mailto:users-bounces at openlayers.org] Im
Auftrag von goeserver developer
Gesendet: Donnerstag, 15. November 2007 07:31
An: users at openlayers.org
Betreff: Re: [OpenLayers-Users] searching a feature with open layers


Hi,

Thanks,
Suppose I have a layer like states , I need to spatially locate , a
particular feature (like : name =texas)it on the map . With javascipt and
WFS I am able to do it . But with openlayers ,how could it be done. 


Eric Lemoine-3 wrote:
> 
> On Nov 13, 2007 1:19 PM, goeserver developer <bjoice at firstam.com> wrote:
>>
>> Hi,
>>
>> How can I include a search ? I am displaying the topp:states layer 
>> along with google map with openlayers. I also want to include a 
>> textbox where I can key in the state name to search. How will geoserver
do the WFS part?
>> Can it be done with Geojson.
> 
> I'm not sure I fully understand your need, but you may be interested 
> in this example:
> <http://www.openlayers.org/dev/examples/getfeatureinfo.html>. WMS 
> GetFeatureInfo is used on each click in this example.
> 
> --
> Eric
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
> 
> 

--
View this message in context:
http://www.nabble.com/searching-a-feature-with-open-layers-tf4797435.html#a1
3761443
Sent from the OpenLayers Users mailing list archive at Nabble.com.

_______________________________________________
Users mailing list
Users at openlayers.org
http://openlayers.org/mailman/listinfo/users




More information about the Users mailing list