Geoserver, string parameter sending by using viewparams values

1.2k views Asked by At

Is it possible to send a string value to SqlView based layer in the viewparameter sequence? My parameter is similar to date (contains dashes) and if I put it in request like this: http://x.y.z/geoserver/db/wms?service=WMS&version=1.1.0&request=GetMap&layers=ABC:AnyDay&styles=&bbox=2069724.275423,7237025.845297,2069831.088769,7237123.162091&width=768&height=699&srs=EPSG:3857&format=image%2Fgif&viewparams=XYZ:2017-10-10

server gives error information: XYZ is integer and SQL query is bad - no layers appear.

I know this solution is dangeoreus but I have to agree with it.

1

There are 1 answers

0
Sawan Nikam On

As error given by geoserver. It seems variable XYZ is of integer type and you are passing argument non integer type. This type error came due to type mismatch.