Hi
I'm using OpenLayers to view SQLView layer with parameters, as WFS layer.
Passing viewparams works with WMS. Default value for parameter also
works as expected.
I can't get openlayers to pass viewparams to geoserver when using WFS.
Can anyone help and show this should be done?
For example, I have tried this:
new OpenLayers.Layer.Vector("WFS", {
strategies: [new OpenLayers.Strategy.BBOX()],
projection: new OpenLayers.Projection("EPSG:4326"),
protocol: new OpenLayers.Protocol.WFS({
version: "1.1.0",
url:
"http://notpublic:8080/geoserver/wfs?viewparams=resolution:1500",
srsName: "EPSG:4326",
featureType: "geom_routes",
featureNS: "http://notpublic/notpublic",
layers: 'notpublic:geom_routes',
viewparams: 'resolution:20000'
})
})
I have also tried passing viewparams in url. Didn't work.
For SQL statement in SQLView I have following:
"SELECT
id,objectid,ikdescription,iklinestyle,iklinecolor,iksellinestyle,iksellinecolor,simplify(the_geom,%resolution%)
AS the_geom from geom_routes"
As said, default value for "resolution" works and simplifies features.
I'm trying to make WFS layer that simplifies features depending current
map resolution.
Best regards,
Pauli Suikka
------------------------------------------------------------------------------
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point of
discussion for anyone considering optimizing the pricing and packaging model
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users