[OpenLayers-Users] simultaneous parse and display of WFS data?
Chris Green
chris.green at ibstv.co.uk
Mon Mar 22 10:23:31 EDT 2010
Hi all
Apologies for re-posting but I am hoping someone can guide me on my problem
over simultaneously parsing and displaying features obtained by WFS on a
vector layer:
I have defined a vector layer which successfully makes a WFS call and
displays features captured by my filter, as below:
var wfs = new OpenLayers.Layer.Vector("WFS", {
styleMap: WFSstyle,
strategies: [new OpenLayers.Strategy.Fixed()],
protocol: new OpenLayers.Protocol.WFS.v1_1_0({
url:
"http://localhost/cgi-bin/mapserv.exe?map=c:/ms4w/apps/NewStart/htdocs/my.ma
p",
featureType: "cities",
info_format: 'text',
maxFeatures: 100,
filter: myFilter,
featureNS: "http://mapserver.gis.umn.edu/mapserver"
})
});
Since I also want a list of the captured features in text form I can get
this by adding to the above protocol definition:
parseFeatures: function(request) {
.code to present features as a list..
}
My problem is that when I add parseFeatures to the WFS protocol the vector
layer no longer displays the features. It seems that I can either have the
features displayed on the layer or parse them into a list, but not both.
Does anyone know of a way of getting both things at the same time?
Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100322/be9642c2/attachment.html
More information about the Users
mailing list