I'm using OpenScales-2.2 and GeoServer-2.3.4.
There is a layer 'myspace:mylayer
'(defined as SQL View and 'ft_number' as SQL View Parameter) on GeoServer.
I try to set additional parameters by WMSParams:
import org.openscales.core.layer.HTTPRequest;
import org.openscales.core.layer.Layer;
import org.openscales.core.layer.ogc.WMS;
import org.openscales.core.layer.params.IHttpParams;
import org.openscales.core.layer.params.ogc.WMSParams;
import org.openscales.core.Map;
...
...
// url and layer
var url:String = "http://localhost:8080/geoserver";
var layer:String = "myspace:mylayer";
// create wms-layer
var wmsLayer:Layer = new WMS("MyWMSLayer", url, layer);
// create params
var params:IHttpParams = new WMSParams(layer);
params.setAdditionalParam("viewparams", "ft_number:20");
(wmsLayer as HTTPRequest).params = params;
// add wms-layer to the map
map.addLayer(wmsLayer);
...
But the "setAdditianalParam
" seems to be invalid, the "features" in the wms-Layer is incorrect.
Following is the request log (Jetty):
"GET /geoserver/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=myspace:mylayer
&STYLES=&SRS=EPSG:4326&BBOX=~,~,~,~
&WIDTH=800&HEIGHT=600&FORMAT=image/png&TRANSPARENT=TRUE&EXCEPTIONS=XML&TILED=false HTTP/1.1"
there is no "viewparams
" above.
Thanks for your reading.
Any suggestion will be appreciated.
--
You received this message because you are subscribed to the Google Groups "openscales-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openscales-de...@googlegroups.com.
To post to this group, send email to opensca...@googlegroups.com.
Visit this group at http://groups.google.com/group/openscales-dev.
For more options, visit https://groups.google.com/groups/opt_out.