[OpenLayers-Users] WFS - slowly Speed

Tim Schaub tschaub at opengeo.org
Tue Jul 27 19:02:57 EDT 2010


Hey-

The OpenLayers.Layer.WFS layer cannot be used with a style map.

Use the OpenLayers.Layer.Vector layer instead (as do all of our WFS 
examples): http://openlayers.org/dev/examples/?q=wfs

Though you may have a small number of features, they look to have a 
large number of coordinates.

 From where I sit, the document below took 10 seconds to load (4 seconds 
waiting, 4 seconds receiving, and about 2 seconds parsing).  That's the 
time required before the OpenLayers GML parser even has a chance to start.

http://zimrob.com:8080/geoserver/wfs?request=GetFeature&typename=crimewebgis:pks_haeufigkeitsverteilung_2009

You may have to do some work on the server side (simplifying features) 
before you can expect better performance on the client.

Tim

On 7/27/10 12:04 PM, Robert Zimmermann wrote:
> I want to draw a WFS Source from GeoServer.
>
> It's working, but very slowly. Firefox stop the script because it’s slow.
>
> There are only 16 polygons with some rules. Is that speed normal? Can i
> speed up it?
>
> Have somebody a idea?
>
> var style_11 = new OpenLayers.Style();
>
> var rulenr17 = new OpenLayers.Rule({
>
> title: "5000-<6000",
>
> filter: new OpenLayers.Filter.Comparison({
>
> type: OpenLayers.Filter.Comparison.BETWEEN,
>
> property: "d_wert",
>
> lowerBoundary: 5000,
>
> upperBoundary: 6000}),
>
> symbolizer: {fillColor: "#FEE5D9",
>
> fillOpacity: 0.9, strokeColor: "black"}
>
> });
>
> var rulenr18 = new OpenLayers.Rule({
>
> title: "6000-<7000",
>
> filter: new OpenLayers.Filter.Comparison({
>
> type: OpenLayers.Filter.Comparison.BETWEEN,
>
> property: "d_wert",
>
> lowerBoundary: 6000,
>
> upperBoundary: 7000}),
>
> symbolizer: {fillColor: "#FCAE91",
>
> fillOpacity: 0.9, strokeColor: "black"}
>
> });
>
>>
>>
> style_11.addRules([rulenr17,rulenr18,rulenr19,rulenr20,rulenr21]);
>
> var haeufigkeitsverteilung = new OpenLayers.Layer.WFS(
> "Häufigkeitsverteilung 2009",
>
> "http://zimrob.com:8080/geoserver/wfs",
>
> {typename: 'crimewebgis:pks_haeufigkeitsverteilung_2009'},
>
> {extractAttributes: true,isBaseLayer:true,visibility:false}
>
> );
>
> map.addLayer(haeufigkeitsverteilung);
>
> haeufigkeitsverteilung.styleMap = new OpenLayers.StyleMap(style_11);
>
> regards
>
> Robert
>
>
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users


-- 
Tim Schaub
OpenGeo - http://opengeo.org
Expert service straight from the developers.



More information about the Users mailing list