[OpenLayers-Users] WFS performance issue
Tim Schaub
tschaub at opengeo.org
Fri Oct 16 21:01:17 EDT 2009
Hey-
Max Stephan wrote:
> Hello list,
>
> I´m using WFS with my GeoServer and OpenLayers to serve some polygons to my
> WebGIS-Application (I´m not using WMS in this case which I know is better
> performancewise cause I need the ability to select and to hover the features
> with visual feedback which is much easier with Vector Features than with
> WMS).
>
> Actually I´m querying my GeoServer with code like this:
> wfsLayer = new OpenLayers.Layer.WFS(....);
> Using firebug I can see that each request takes up to 6 seconds (which is
> way too long in my opinion). In addition OpenLayers is rerequesting every
> time I pan the map, even when it´s only 1 pixel.
>
> I´ve read here and seen in the examples that it´s recommended to use BBOX
> and/or FIXED-Strategy in combination with an vectorlayer.
If you're seeing features come back, it seems like you probably have
your map projection correctly set. However, it's tough to say what else
could be wrong. Are you able to put up your application online
somewhere? That is typically the easiest for remote troubleshooting.
If you can't make the application public, the second best would be to
attach the smallest possible example that reproduces your problem.
Tim
> I tried that like this:
> var wfsLayer = new OpenLayers.Layer.Vector("WFS", {
> strategies: [new OpenLayers.Strategy.BBOX()],
> projection: new OpenLayers.Projection("EPSG:31468"),
> protocol: new OpenLayers.Protocol.WFS({
> url: "http://...",
> featureType: "...",
> srsName: 'EPSG:31468',
> extractAttributes: true
> })
> });
> In firebug I can see that there is a response containing all the features in
> the bbox with the right coordinates and attributes. But: Those features
> don´t show on the map at all.
>
> Any help is appreciated
> Thx in advance
> Max Stephan
--
Tim Schaub
OpenGeo - http://opengeo.org
Expert service straight from the developers.
More information about the Users
mailing list