>
> In my map i have a wfs layer that i want display content of one
> attribute (postgis table) by feature click.
> Can you help me the better choice to that?
An alternative approach is using WFSProtocol and DrawFeature control.
Create a WFSProtocol object for your wfs layer then:
ptSelCtrl = new OpenLayers.Control.DrawFeature(selectedLayer,
OpenLayers.Handler.Point,{
handlerOptions: {
citeCompliant: true
}
});
ptSelCtrl.events.register("featureadded", this, function (e) {
// could use BBOX instead of DWITHIN for servers that dont support
DWITHIN (eg arcgis 9.3)
var pfilter = new OpenLayers.Filter.Spatial({
type: OpenLayers.Filter.Spatial.DWITHIN,
distance: 100, // you probably want to think about
scale-independent distance method for this
distanceUnits: "meters",
value: e.feature.geometry
});
wfsProtocol.read({
filter: pfilter,
callback: processTheReturn,
scope: strategy
});
Notice: This email and any attachments are confidential. If received in error
please destroy and immediately notify us. Do not copy or disclose the contents.
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users