[OpenLayers-Users] Control.GetFeature

Ivan Grcic igrcic at gmail.com
Fri Nov 27 11:37:50 EST 2009


OpenLayers.Protocol.WFS.fromWMSLayer is just convinient method for
creating OpenLayers.Protocol.WFS from allready defined WMS layer. So
you can just define protocol as:

protocol: OpenLayers.Protocol.WFS({
            readFormat: new OpenLayers.Format.GeoJSON(),
            formatOptions: {
                outputFormat: "JSON"
            },
            url: "http://localhost:8080/geoserver/wfs"
            featureType: "ftName",
            featurePrefix: 'prefix',
            featureNS: "http://ns",
            geometryName: 'geometry',
            maxFeatures: 100
})

cheers

On Fri, Nov 27, 2009 at 3:20 PM, stash <steffen.schwarz85 at googlemail.com> wrote:
>
> Hello,
>
> at the moment I have a wms getfeatureinfo to get features of the points on
> my map.
>
> Because I only want to get features of certain points I want to exchange the
> wms getfeatureinfo wit a control.getfeature.
>
> I read in the examples and the classdocumentation of openlayers that I have
> to implement at least a protocol to get it working.
>
> And there is my problem. How can I do that. every example I looked up was
> not interesting for me, because the protocol was defined like that:
>
> protocol: OpenLayers.Protocol.WFS.fromWMSLayer(...)
>
> But my protocol is from a wfs not from a wms. How do I implement that, when
> my protocol comes from a wfs?
>
> i have only a wms as a background worldcard. My wfs contains the points I
> want to getfeature from.
>
> How can I do that?
>
> Thanks for the help.
>
> Regards
> stash
> --
> View this message in context: http://n2.nabble.com/Control-GetFeature-tp4075933p4075933.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>



-- 
Ivan Grcic



More information about the Users mailing list